It says "only root can do that" I have already set SUID on them mount commands, and that used to work with 8.2 -rwsr-xr-x 1 root root 554863 2003-09-24 02:17 /usr/lib/samba/classic/smbmnt -rwsr-xr-x 1 root root 551367 2003-09-24 02:17 /usr/lib/samba/classic/smbumount
It says "only root can do that"
Add the user option to the options list for the mount points in /etc/fstab -- James Ogley, Webmaster, Rubber Turnip james@rubberturnip.org.uk http://www.rubberturnip.org.uk Jabber: riggwelter@myjabber.net Using Free Software since 1994, running GNU/Linux (SuSE 9.0). GNOME updates for SuSE: http://www.usr-local-bin.org
James Ogley wrote:
It says "only root can do that"
Add the user option to the options list for the mount points in /etc/fstab
No /etc/fstab involved. I want to be able to mount as user any share, from any server, at any time, without editing /etc/fstab. mount -t smbfs //server/share /local/mount/point -o username=silviu,workgroup=WIN As I said, this used to work by seting SUID on smbmnt and smbumount.
<snip>
I want to be able to mount as user any share, from any server, at any time, without editing /etc/fstab.
mount -t smbfs //server/share /local/mount/point -o username=silviu,workgroup=WIN
As I said, this used to work by seting SUID on smbmnt and smbumount.
Then try and using smbmount and smbumount directly. For example this will mount a share called mp3 on a server named server and mount it to a local mp3 dir. smbmount //server/mp3 mp3/. See if this helps you with what you want to do. -- Marshall "Nothing is impossible, we just do not have all the answers to make the impossible, possible."
Marshall Heartley wrote:
Then try and using smbmount and smbumount directly. For example this will mount a share called mp3 on a server named server and mount it to a local mp3 dir. smbmount //server/mp3 mp3/. See if this helps you with what you want to do.
Yes, I have used smbmount directly and that works. I'm trying to set-up pam_mount to mount windows shares from a server, at login time, and using the user/password that are entered by the user, so that access rights are proper. konqueror & smb:/ is not enough because there is no locking on files. If two users open the same file and modify it, the last user that saves it, "wins". Anyway, I can't get pam_mount to work. Maybe there's someone who's using it, and can help me a little... pam_mount 0.9.0 included in SUSE LINUX 9.0 This is pam_mount.conf: debug 1 mkmountpoint 1 lsof /usr/sbin/lsof options_require nosuid,nodev luserconf .pam_mount.conf smbmount /usr/lib/samba/classic/smbmount ncpmount /bin/mount -t ncpfs umount /usr/lib/samba/classic/smbumount lclmount /bin/mount -p0 mntcheck /bin/mount # For BSD's (don't have /etc/mtab) volume * smb gdsnew tehnic /home/&/Documents/servermount/tehnic workgroup=WIN - - This is what I get in /var/log/messages Nov 21 12:45:17 linux-robank kdm[2941]: pam_mount: expand_wildcard for tehnic Nov 21 12:45:17 linux-robank kdm[2941]: pam_mount: error expanding configuration I can mount the share manually: /usr/lib/samba/classic/smbmount //gdsnew/tehnic /home/WIN+administrator/Documents/servermount/tehnic/ -o username=WIN+Administrator,workgroup=WIN Password: WIN+Administrator@linux-robank:~> ls /home/WIN+administrator/Documents/servermount/tehnic/ GenesysRack kituri_service proiecte service tehkits teste Thanks.
<snip>
This is pam_mount.conf: debug 1 mkmountpoint 1 lsof /usr/sbin/lsof options_require nosuid,nodev luserconf .pam_mount.conf smbmount /usr/lib/samba/classic/smbmount ncpmount /bin/mount -t ncpfs umount /usr/lib/samba/classic/smbumount lclmount /bin/mount -p0 mntcheck /bin/mount # For BSD's (don't have /etc/mtab) volume * smb gdsnew tehnic /home/&/Documents/servermount/tehnic workgroup=WIN - - <snip>
Try removing the nosuid from the options_require line and login again. See if the removal of that line will work for the first thing to try. If it does, then great. Unfortunately, my knowledge of pam is limited so I will not know how to get it to work with a great deal of security. I think that there are others on the list that can get the security up enough for you to do what you want to do without this type of compromise. -- Marshall "Nothing is impossible, we just do not have all the answers to make the impossible, possible."
Marshall Heartley wrote:
<snip>
This is pam_mount.conf: debug 1 mkmountpoint 1 lsof /usr/sbin/lsof options_require nosuid,nodev luserconf .pam_mount.conf smbmount /usr/lib/samba/classic/smbmount ncpmount /bin/mount -t ncpfs umount /usr/lib/samba/classic/smbumount lclmount /bin/mount -p0 mntcheck /bin/mount # For BSD's (don't have /etc/mtab) volume * smb gdsnew tehnic /home/&/Documents/servermount/tehnic workgroup=WIN - -
<snip>
Try removing the nosuid from the options_require
nosuid and nodev are for NFS. smbfs does not support them anyway. Nevertheless, I _did_ try it, because I'm at that point where reason is exhausted, and I try all the crazy stuff that I _know_ it can't work. Yet the same kind of mystical hope that makes people buy lottery tickets makes me try the crazy stuff anyway. Like reinstalling stupid Windows programs, knowing that it won't solve anything. WhyTF does it give error expanding "tehnic"? There is nothing to expand about it. It would've been such a fine and elegant solution, if it were to work.
<snip>
Try removing the nosuid from the options_require
nosuid and nodev are for NFS. smbfs does not support them anyway. Nevertheless, I _did_ try it, because I'm at that point where reason is exhausted, and I try all the crazy stuff that I _know_ it can't work.
Yet the same kind of mystical hope that makes people buy lottery tickets makes me try the crazy stuff anyway. Like reinstalling stupid Windows programs, knowing that it won't solve anything.
Sorry about that :( I thought that this may work.
WhyTF does it give error expanding "tehnic"? There is nothing to expand about it.
What is the ampersand used for in the volume line? I would think that that character would try and be interpreted by the shell. Again maybe I am wrong again here as well.
It would've been such a fine and elegant solution, if it were to work.
Sorry that I wasn't able to help :( -- Marshall "Nothing is impossible, we just do not have all the answers to make the impossible, possible."
Silviu Marin-Caea wrote:
James Ogley wrote:
It says "only root can do that"
Add the user option to the options list for the mount points in /etc/fstab
No /etc/fstab involved.
I want to be able to mount as user any share, from any server, at any time, without editing /etc/fstab.
mount -t smbfs //server/share /local/mount/point -o username=silviu,workgroup=WIN
As I said, this used to work by seting SUID on smbmnt and smbumount.
You need to use the follow parameters, after the username uid=[user number] gid=[grop number] And the directory will be to this user!!!! -- ------------------------------------------------------ Una prensa libre es el gran enemigo de los dictadores. Independientemente de sus abusos, sus debilidades, sus errores. Una prensa libre es la gran aliada y defensora de la democracia. Charlos S. Shapiro Embajador de USA en la Rep. de Venezuela Martes, 20 de Mayo 2003
participants (4)
-
Hipolito A. Gonzalez M.
-
James Ogley
-
Marshall Heartley
-
Silviu Marin-Caea