[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Mounting a Windows Share



On 02/01/16 04:15 PM, Steve Matzura wrote:
On Sat, 02 Jan 2016 15:00:31 -0500, The Wanderer
<wanderer@fastmail.fm> wrote:

I presume that the user as which you are attempting to run the later
mount command has write and execute permission on this new directory.
Yes. It's root, which means it's me, as I'm the only one fooling with
this at the moment.
Don't mount things as root. Give the mount point a normal user/group. Try chgrp users /mnt/users


In /etc/fstab, as directed by the same article, I have placed the
line:

//box/users2 /mnt/users cifs
That looks incomplete to me; it doesn't seem to specify the mount
options, or the usual zero values for the "dump" and "pass" columns.
You're right. I knew they were missing, but the article that
instructed me on how to modify fstab didn't explain what the two 0's
at the end of the line are for, so I omitted them, hoping an error
message would give me a clue as to what I should put in their places.

The full line should be something like:
 //box/users2 /mnt/users cifs user,username=<username> 0 0

If you're running that command as root, the fstab entry should not be
necessary; if you're running it as non-root, IIRC the "specify both
mount point and device to mount" will be rejected as "only root can do
that". Either way, this doesn't look quite right.
I'm running it as root all right. I just now tried:

mount -t cifs //box/users2 /mnt/share -o username:"Steve Matzura"

and got back:

Username specified with no parameter
That syntax is invalid. You'd need something like -o username="Steve Matzura", assuming Steve Matzura is a valid username.


The system responds:

mount error(13): Permission denied

Is there a default username and password I'm supposed to use, like
maybe the Windows network password, or something else perhaps?
You most likely need the username and password of a user account on the
Windows box which can access that directory; you may also need to
configure the Windows share to specifically grant that user account
access to the share. With that done, you will need to specify those
credentials in the mount command, with the '-o user=' option.

(Technically what you need is a user account on the appropriate
_domain_, but for a non-domain-joined Windows computer the "domain" is
the name of the computer, and AFAIK does not need to be specified
separately. If this computer _is_ domain-joined and you log in to it
with a domain account, you will probably need to specify the domain in
the mount command as well.)
Nothing that complicated. Just a default system username, which is my
name, and no login password. I tried:

-o user="Steve Matzura",pass=""

Probably not a valid user name.


Reply to: