![](https://seccdn.libravatar.org/avatar/3e1352bfef10435f2311e11bd44ba060.jpg?s=120&d=mm&r=g)
I recently updated my Suse 6.0 with samba 2.0.6 and I have got all the win to Linux working ok. So my problem is how to mount the win stuff so that I can see it on the linux box. I have tried every possible combination with smbmount and the closest I get is ...
smbmount //192.168.244.xxx/c /thes
(I'm trying to mount the hd of 192.168.244.xxx)
I get prompted for a password and then no matter what I enter, I get the message `mount error: Invalid argument'
The smbmount/smbumount programs are not part of samba, and only shipped with it for the convenience of linux users. The samba team uses some kind of scheme where you start a new shell, and inside it commands will access the remote windows machine or some such, not my favourite. It doesn't provide a filesystem, however it works on all unix. The smbmount/umount syntax has changed severely a number of times, with the documentation in various places being inconsistent, incomplete, or simply wrong. At some stage some great flexibility was introduced into smbclient with the -c OPTIONS-TO-MOUNT option. Unfortunately it caused a security problem and was removed again, but man pages aren't up to date. You can no longer set the uid and gid of the mounted share, nor the permissions, but the umask at time of mount is effective thus providing a workaround for that. I use this tcsh code; it tests for kernel versions but it should really test for smbmount versions. I suspect early smbmounts were too shoddy to supply their version info. The whole smbmount/umount business still looks somewhat shoddy to me... If you want user != root to be able to run it, you must suid root the smbmnt program. That is probably a security risk. Your choice. Perhaps some more recent samba or smbfs documentation has more to say. Try one of these: if ( "`uname -r | grep '^2.2.[0-9][0-9]'`" != "" ) then echo "smbfs for linux kernel 2.2.10 and above" alias domount 'echo "Accessing \!:1 via samba/smbfs:";'\ 'umask \!:4; smbmount \!:2 \!:3 -U MSUSER' set smbfs=$HOME/mnt domount MSUSER@MSHOST //MSHOST/MSUSER$ $smbfs/MSHOSTMSUSER 077 $*:q else if ( "`uname -r | grep '^2.2'`" != "" ) then echo "smbfs for linux kernel 2.2.X, X < 10" echo "Accessing MSUSER@MSHOST" smbmount '\\MSHOST\MSUSER$' -U MSUSER \ -c "mount $HOME/mnt/MSHOSTMSUSER -g smb -d 700 -f 600" $*:q else echo "smbfs for linux kernel 2.0.X (or some such)" echo "Accessing MSUSER@MSHOST" smbmount //MSHOST/MSUSER$ ~/mnt/MSHOSTMSUSER \ -U MSUSER -c `hostname -s` -g smb -f 700 $*:q endif I think the possibly much better way of accessing windows shares is by using sharity, see http://www.obdev.at/Products/Sharity.html . There are rpms as well. Sharity has some nifty features, like an automounter and windows-style network neighbourhood browser. Volker -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
participants (1)
-
kuhlmav@elec.canterbury.ac.nz