I've been trying to configure fstab, to allow a user to mount an smb share, but it doesn't seem to work. When I try to use the user or users options, I get an error. Is there any other option or method that allows a user to mount an smb share? It works fine, when mounting as root, without the user option specified. tnx jk
James, El Jue 04 Nov 2004 15:24, James Knott escribió:
I've been trying to configure fstab, to allow a user to mount an smb share, but it doesn't seem to work. When I try to use the user or users options, I get an error. Is there any other option or method that allows a user to mount an smb share? It works fine, when mounting as root, without the user option specified.
For users being able to mount shares from Windows boxes in the network, the smbmnt command must have the suid bit set. To do so, do (as root) 'chmod +s /usr/bin/smbmnt'. The same holds true for smbumount, as your users may wish to unmount the previously mounted shares. I guess there may lay your problem. Regards, -- Andreas Philipp Noema Ltda. Bogotá, D.C. - Colombia Tel./Fax: +57.1.6252084
Andreas Philipp wrote:
James,
El Jue 04 Nov 2004 15:24, James Knott escribió:
I've been trying to configure fstab, to allow a user to mount an smb share, but it doesn't seem to work. When I try to use the user or users options, I get an error. Is there any other option or method that allows a user to mount an smb share? It works fine, when mounting as root, without the user option specified.
For users being able to mount shares from Windows boxes in the network, the smbmnt command must have the suid bit set. To do so, do (as root) 'chmod +s /usr/bin/smbmnt'. The same holds true for smbumount, as your users may wish to unmount the previously mounted shares. I guess there may lay your problem.
Regards,
/usr/bin/smbmnt is a sym link, which points to another sym link, that points to /usr/lib/samba/classic/smbmnt. Changing that to suid had no effect.
James, El Jue 04 Nov 2004 16:34, James Knott escribió:
Andreas Philipp wrote:
James,
El Jue 04 Nov 2004 15:24, James Knott escribió:
I've been trying to configure fstab, to allow a user to mount an smb share, but it doesn't seem to work. When I try to use the user or users options, I get an error. Is there any other option or method that allows a user to mount an smb share? It works fine, when mounting as root, without the user option specified.
For users being able to mount shares from Windows boxes in the network, the smbmnt command must have the suid bit set. To do so, do (as root) 'chmod +s /usr/bin/smbmnt'. The same holds true for smbumount, as your users may wish to unmount the previously mounted shares. I guess there may lay your problem.
Regards,
/usr/bin/smbmnt is a sym link, which points to another sym link, that points to /usr/lib/samba/classic/smbmnt. Changing that to suid had no effect.
So what exactly is the error you get when trying to mount smb shares as a user different from root? What are you trying to configure in fstab? To do an interactive mount there is no need to modify anything in /etc/fstab. One other thing to remember is that the user trying to mount the smb share needs write permission on the mount point, but you certainly have thought of that. Regards, -- Andreas Philipp Noema Ltda. Bogotá, D.C. - Colombia
Andreas Philipp wrote:
James,
El Jue 04 Nov 2004 16:34, James Knott escribió:
Andreas Philipp wrote:
James,
El Jue 04 Nov 2004 15:24, James Knott escribió:
I've been trying to configure fstab, to allow a user to mount an smb share, but it doesn't seem to work. When I try to use the user or users options, I get an error. Is there any other option or method that allows a user to mount an smb share? It works fine, when mounting as root, without the user option specified.
For users being able to mount shares from Windows boxes in the network, the smbmnt command must have the suid bit set. To do so, do (as root) 'chmod +s /usr/bin/smbmnt'. The same holds true for smbumount, as your users may wish to unmount the previously mounted shares. I guess there may lay your problem.
Regards,
/usr/bin/smbmnt is a sym link, which points to another sym link, that points to /usr/lib/samba/classic/smbmnt. Changing that to suid had no effect.
So what exactly is the error you get when trying to mount smb shares as a user different from root? What are you trying to configure in fstab? To do an interactive mount there is no need to modify anything in /etc/fstab.
One other thing to remember is that the user trying to mount the smb share needs write permission on the mount point, but you certainly have thought of that.
Regards,
Permissions are set to 777. If fstab contains: //OS2/EDRIVE /mnt/os2/e smbfs username=xxxx,password=yyyy,rw,users,noauto 0 0 The error I get is: cannot mount on /mnt/os2/e: Operation not permitted smbmnt failed: 1 With this in fstab: //OS2/EDRIVE /mnt/os2/e smbfs credentials=/home/jknott/.smbpw,uid=jknott,gid=users,fmask=664,dmask=775 0 0 I get: mount: only root can mount //OS2/EDRIVE on /mnt/os2/e Either way, root can mount the share. Incidentally, this is in SuSE 9.0. tnx
James, El Jue 04 Nov 2004 20:35, James Knott escribió:
Andreas Philipp wrote:
So what exactly is the error you get when trying to mount smb shares as a user different from root? What are you trying to configure in fstab? To do an interactive mount there is no need to modify anything in /etc/fstab.
Permissions are set to 777. If fstab contains: //OS2/EDRIVE /mnt/os2/e smbfs username=xxxx,password=yyyy,rw,users,noauto 0 0
The error I get is: cannot mount on /mnt/os2/e: Operation not permitted smbmnt failed: 1
With this in fstab: //OS2/EDRIVE /mnt/os2/e smbfs credentials=/home/jknott/.smbpw,uid=jknott,gid=users,fmask=664,dmask=775 0 0
I get: mount: only root can mount //OS2/EDRIVE on /mnt/os2/e
What I still don't get is why you would put these entries into fstab; do you wish the share to be mounted at boot time? Here's some lines from the smbmnt manual page: ** DESCRIPTION smbmnt is a helper application used by the smbmount program to do the actual mounting of SMB shares. smbmnt can be installed setuid root if you want normal users to be able to mount their SMB shares. A setuid smbmnt will only allow mounts on directories owned by the user,and that the user has write permission on. ** I suppose your /mnt/os2/e mount point is owned by root, so even if permission were set to 777, only root would be able to mount the share on it. Have you tried to mount the share on a directory under your home directory? Let's say, you create /home/jknott/edrive, and then try to mount the share interactively 'smbmount //OS2/EDRIVE /home/jknott/edrive', you should be prompted for your user's password and, if you have permission on the share, it should get mounted all right. Regards, -- Andreas Philipp Noema Ltda. Bogotá, D.C. - Colombia
Andreas Philipp wrote:
James,
El Jue 04 Nov 2004 20:35, James Knott escribió:
Andreas Philipp wrote:
So what exactly is the error you get when trying to mount smb shares as a user different from root? What are you trying to configure in fstab? To do an interactive mount there is no need to modify anything in /etc/fstab.
Permissions are set to 777. If fstab contains: //OS2/EDRIVE /mnt/os2/e smbfs username=xxxx,password=yyyy,rw,users,noauto 0 0
The error I get is: cannot mount on /mnt/os2/e: Operation not permitted smbmnt failed: 1
With this in fstab: //OS2/EDRIVE /mnt/os2/e smbfs credentials=/home/jknott/.smbpw,uid=jknott,gid=users,fmask=664,dmask=775 0 0
I get: mount: only root can mount //OS2/EDRIVE on /mnt/os2/e
What I still don't get is why you would put these entries into fstab; do you wish the share to be mounted at boot time?
No, I want to be able to mount them at any time, as that computer is not all on all the time.
Here's some lines from the smbmnt manual page:
** DESCRIPTION smbmnt is a helper application used by the smbmount program to do the actual mounting of SMB shares. smbmnt can be installed setuid root if you want normal users to be able to mount their SMB shares.
A setuid smbmnt will only allow mounts on directories owned by the user,and that the user has write permission on. **
I suppose your /mnt/os2/e mount point is owned by root, so even if permission were set to 777, only root would be able to mount the share on it.
I have set the owner of both /mnt/os2 and /mnt/os2/e to jknott.
Have you tried to mount the share on a directory under your home directory? Let's say, you create /home/jknott/edrive, and then try to mount the share interactively 'smbmount //OS2/EDRIVE /home/jknott/edrive', you should be prompted for your user's password and, if you have permission on the share, it should get mounted all right.
I have tried providing the user ID and password in two ways. One as part of the line in fstab and the other, using the credentials option. In both cases, root can mount the share, but the user cannot. This implies that the OS/2 system see the appropriate ID and password. The problem would appear to be in the mounting on the Linux system.
James, El Jue 04 Nov 2004 21:21, James Knott escribió:
Andreas Philipp wrote:
What I still don't get is why you would put these entries into fstab; do you wish the share to be mounted at boot time?
No, I want to be able to mount them at any time, as that computer is not all on all the time.
Ok, so why bother with entries into fstab? You provide the share on the other computer, a mount point on your Linux box, and the Samba client tools should be able to mount the share all right. I have not long ago begun using smb4k on my KDE desktop as a smb share browser, and it manages the browsing and mounting very well, permitting even to open a mounted share to be opened in a Konqueror tab by a single click. Have a look at http://smb4k.berlios.de.
I have tried providing the user ID and password in two ways. One as part of the line in fstab and the other, using the credentials option. In both cases, root can mount the share, but the user cannot. This implies that the OS/2 system see the appropriate ID and password. The problem would appear to be in the mounting on the Linux system.
Agreed. And I still think it may have to do with the mount point. As user, I always mount shares from the Windows machines in our office network on some mount point under my home directory. The above mentioned smb4k application, for instance, has its own directory under my home directory, and creates therein the mount points as needed 'on the fly'. Have you tried to use the smbmount command to mount your share interactively on some directory under /home/jknott? (And now I am looking forward to more notifications from Alberta,,,) Regards, -- Andreas Philipp Noema Ltda. Bogotá, D.C. - Colombia
James Knott wrote:
I've been trying to configure fstab, to allow a user to mount an smb share, but it doesn't seem to work. When I try to use the user or users options, I get an error. Is there any other option or method that allows a user to mount an smb share? It works fine, when mounting as root, without the user option specified.
tnx jk If memory serves me use the /etc/mtab file for the smb share.
Do keep us informed. -- The tabbed out Little Helper ======================================================================== Hylton Conacher - Linux user # 229959 at http://counter.li.org Currently using SuSE 9.0 Professional with KDE 3.1 Licenced Windows user ========================================================================
Hylton Conacher (ZR1HPC) wrote:
James Knott wrote:
I've been trying to configure fstab, to allow a user to mount an smb share, but it doesn't seem to work. When I try to use the user or users options, I get an error. Is there any other option or method that allows a user to mount an smb share? It works fine, when mounting as root, without the user option specified.
tnx jk
If memory serves me use the /etc/mtab file for the smb share.
Do keep us informed.
I thought mtab listed the mounted file systems, and was not used to configure them.
On Sun, 2004-11-07 at 13:58, James Knott wrote:
Hylton Conacher (ZR1HPC) wrote:
James Knott wrote:
If memory serves me use the /etc/mtab file for the smb share.
Do keep us informed.
I thought mtab listed the mounted file systems, and was not used to configure them.
That is correct, you configure mount points in /etc/fstab. For smb mounted filesystems you can use /etc/samba/smbfstab -- Ken Schneider UNIX since 1989 SuSE since 1998 * Only reply to the list please*
On Sun, 07 Nov 2004 11:35:03 +0200, Hylton Conacher (ZR1HPC)
James Knott wrote:
I've been trying to configure fstab, to allow a user to mount an smb share, but it doesn't seem to work. When I try to use the user or users options, I get an error. Is there any other option or method that allows a user to mount an smb share? It works fine, when mounting as root, without the user option specified.
tnx jk If memory serves me use the /etc/mtab file for the smb share.
Do keep us informed.
Ok, I didn't think this sounded right.. so i searched and thought so.. - /etc/fstab is the configuration file for the mount command - /etc/mtab normally contains a list of the filesystems that are currently mounted You should put the smb mount in fstab. It would help to know what error you're getting. can you mount it on the command line OK? if you take what you put in fstab and type it on the command line does it work?
mmarseglia a écrit :
On Sun, 07 Nov 2004 11:35:03 +0200, Hylton Conacher (ZR1HPC)
wrote: James Knott wrote:
I've been trying to configure fstab, to allow a user to mount an smb share, but it doesn't seem to work. When I try to use the user or users options, I get an error. Is there any other option or method that allows a user to mount an smb share? It works fine, when mounting as root, without the user option specified.
tnx jk
If memory serves me use the /etc/mtab file for the smb share.
Do keep us informed.
Ok, I didn't think this sounded right.. so i searched and thought so..
- /etc/fstab is the configuration file for the mount command - /etc/mtab normally contains a list of the filesystems that are currently mounted
You should put the smb mount in fstab. It would help to know what error you're getting. can you mount it on the command line OK? if you take what you put in fstab and type it on the command line does it work?
Hello, It works fine in my box, below is the line in my fstab file : //flute/E /home/"my name"/"my folder" smbfs rw,noauto,user,uid="my name",gid=users,guest,iocharset=iso8859-1 0 0 Michel
mmarseglia wrote:
You should put the smb mount in fstab. It would help to know what error you're getting. can you mount it on the command line OK? if you take what you put in fstab and type it on the command line does it work?
I can mount the share as root, but not as a user. I posted the error messages in an earlier message, but essentially they say that only root can mount the shares. The user & users options are apparently not valid with smbfs and will in fact cause an error even when root attemps to mount a share that includes them in the options.
On Mon, 2004-11-08 at 08:07, James Knott wrote:
mmarseglia wrote:
You should put the smb mount in fstab. It would help to know what error you're getting. can you mount it on the command line OK? if you take what you put in fstab and type it on the command line does it work?
I can mount the share as root, but not as a user. I posted the error messages in an earlier message, but essentially they say that only root can mount the shares. The user & users options are apparently not valid with smbfs and will in fact cause an error even when root attemps to mount a share that includes them in the options.
Issue these two commands as root, then you should be able to mount smb shares as regular user. chmod u+s /usr/bin/smbmnt chmod u+s /usr/bin/smbumount
participants (7)
-
Andreas Philipp
-
Catimimi
-
Chuck Stuettgen
-
Hylton Conacher (ZR1HPC)
-
James Knott
-
Ken Schneider
-
mmarseglia