samba mount not visible to all users

wilch101 used Ask the Experts™
I am trying to mount a share from a windows box using samba.  When I mount it as root, all is ok, except other users on the unix box cannot see the mount.  I want to make it visible for all.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
could you please post your mount command (or /etc/fstab entry)


The command is in the fstab

ntserver:/email /mnt/email cifs username=jamie,password=pass 0 0

> .. other users on the unix box cannot see the mount.

do you mean that
  ls -l /mnt/email
does not report anything?
Otherwise, please post result.
Amazon Web Services

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.


The directory /mnt/email is not even visible for other users.  As root it is visible and doing an ls lists the files on the remote share.  If I unmount the remote share, the directory /mnt/email becomes visible again for all users.


An update...

Even though it is not visible, if a user tries to cd into the directory, they get a permission denied message.

su root -c 'umount /mnt/email && chmod 777 /mnt/email'

then mount it again and check.


no change.  same problem
Note that SMB is extremely user-oriented, so the only 'correct' way to do this is to have a seperate mount for each user on the system.
chris_calabrese, I agree i.g., but if smbmount is used, then the SMB mounted filesystem is as if has been mounted by standard unix mount, and that's a host mount, always.

smbmount might set the permissions to the unix-user on the mount point, and the kernel serves the data which then is treated with the SMB permissions on the SMB-server. So, if the mount point is world writable, the SMB-server has the feeling that all data is comming from the SMB-user, nevertheless which unix-user it sends.

AFAIK, to get user-based permissions/ACLs, you need to use smbclient, smbmount is like NFS: host-based.

wilch101, you need yourself used to this difference, then decide if you really want that a SMB-mount by one unix-user, can be used from other unix-users.


I do want other users to access the mount.  How do I set up a seperate mount for each user.
for each USER write a line in your /etc/fstab like:

ntserver:/email /mnt/USER cifs noauto,user,username=SMB-U,password= 0 0

where USER is the unix-username, and SMB-U the SMB-username.
leave the password empty (or even remove the password= option), so that when the user tries to mount, (s)he will be asked for the password.
See man smbmount for more details about passwords.

/mnt/USER should have permissions 700 and owned by USER.


It is not liking the noauto and user options.  I am getting messages:

mount: illegal file system specific option noauto
mount: illegal file system specific option user

The system is HP-UX 11i if that makes a difference.
HP-UX, ok I still woundered about the cifs fs type :-0
If mount complains about the options, just remove them, probably the username= is enough.
I'm not shure what HP-UX does while mount -a is called during boot, probably you need to test (see noauto option).


I was able to figure it out.

Each user needs to run cifslogin once to log onto the smb mount.  With the -s option, the username and password are stored in a database, and they only have to run it once.

Thanks for your help and comments.

AFAIK cifslogin is not part of Samba, but HP-UX.
So, did we bark up the wrong tree?


 What OS ? there must be amb.conf.example
  ok, try to put in smb.conf the Guest_OK=yes, or if you must auithenticate users, put the users that should see the share, and ad the users with smbpasswd -a user (-a to add one)

No comment has been added lately, so it's time to clean up this Topic Area.
I will leave a recommendation for this question in the Cleanup topic area as follows:

- PAQ & refund points

Please leave any comments here within the next 7 days


Cleanup Volunteer
per recommendation

Community Support Moderator @Experts Exchange

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial