[Samba] How do users access shares?

Robert Marcano robert at marcanoonline.com
Mon Nov 8 17:10:35 UTC 2021


On 11/8/21 11:40 AM, Rob Campbell via samba wrote:
> I am able to smbclient //host/share -U redhat -c 'ls' and view the files
> but how do I mount that [as a user]?  All links I find say I need to put it
> in /etc/fstab.  If I do that, won't everyone have access?  I don't want
> that.  You know how you would 'net use' to map in Windows, is this not
> possible in Linux?
> 

Whe you mount a share on Linux, you are using another client that is 
part of the kernel, not smbclient that is a user space implementation.

Try

mount -t cifs -o username=redhat //host/share /mnt/target_dir

You will need to have installed the mount.cifs utility. Read the manual 
page of that command if you want to automate more parameters like the 
password.




More information about the samba mailing list