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.
On 11/8/21 11:10 AM, Robert Marcano via samba wrote:> 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. > >However, on the desktop UI side, I for example use Dolphin under a kerberos winbind domain joined host where I can browse to Windows shares just like on Windows. And if you allow multiple graphical users (something like Xrdp), each person can do the same with same sort of Windows semantics with regards to share access. Can you do the same with the cifs kernel module and command line with automounting? Tada... yes, but takes some work to setup correctly.
Thanks Robert. I have tried that but it requires root or sudo. OR chmod u+s /bin/mount /bin/umount /usr/sbin/mount.cifs. But then it requires I put it in /etc/fstab. If I do that, it will mount for all users, right? That's not what I want. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In all things, Be Intentional. On Mon, Nov 8, 2021 at 3:08 PM Robert Marcano via samba < samba at lists.samba.org> wrote:> 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. > > > -- > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba >