Mounting SMB shares as non-root
Running slackware 10.2 and I occasionally connect to a windows VPN and need access to shares. As root, I can enter the following and I have access as I would expect
Code:
smbmount //server/myfolder /mnt/share1 -o username=DOMAIN\\myname,password=mypass Code:
cannot mount on /mnt/share1: Operation not permitted Thanks, Tom |
Nothing really. Usually, root access is required to mount anything. When you attach USB devices that get mounted automagically, some process with root authority is doing the mount on your behalf.
One thing you can try is use "sudo" to run the smbmount command. Not being able to run smbmount might seem like a pain in the a**, but from a security perspective not allowing regular users to mount devices is a good thing, at least IMO. :) Peace... |
Anything I could do in fstab to make this an easier process? Mounting 10 shares by typing all those isn't exactly "friendly". Note that I have no problem with my users having access (that is what I want).
Thanks, Tom |
Quote:
Code:
//server/myfolder /mnt/share1 smbfs username=DOMAIN\\myname,password=mypass 0 0 Quote:
Quote:
Peace... |
Added this to fstab via root:
Code:
//server/myfolder /mnt/share1 smbfs username=DOMAIN\\myname,password=mypass 0 0 Code:
mount /mnt/share1 Tom |
You need to make `smbmnt` setuid root in order to have normal users do the mount.
|
Quote:
Tom |
From `man smbmnt`:
Quote:
|
Quote:
When I setup fstab to mount SMB shares, I wanted it to be done at boot time and not on-demand. As a test. make /mnt/share1 owned by your userid and see if you can mount it on-demand. Peace... |
Quote:
Another way of mounting on demand without the problem you mention is using sudo. |
Quote:
Quote:
Additionally, if superuser access is required to mount the SMB share, I imagine there might be some permissions issues that would need to be worked out after the share is mounted. The user mounting the share might want read/write access to it. Peace... |
Quote:
Tom |
All times are GMT -5. The time now is 03:58 AM. |