smbmount like a normal user
Pablo Caraballo
pcara at sucre.udo.edu.ve
Mon Nov 22 19:51:55 GMT 1999
HI!
I am using RH 6.0 and samba 2.0.3 and I have two questions: first I
want to mount my smbfs as a normal user and second, I would like to pass
parameters with "-c" but without having to show my password.
To mount as an user I included a line in /etc/fstab like:
//XXXXXX/PABLO /mnt/xxxxxx smbfs
rw,nosuid,noexec,dev,noauto,async,user 0 0
But when a user write: mount /mnt/xxxxxx
samba does not ask for a password but said that it is required:
.....
security=share
SMBtconX failed. ERRSRV - ERRbadpw (Bad password - name/password
pair in a Tree Connect or Session Setup are invalid.)
Perhaps you are using the wrong sharename, username or password?
Some servers insist that these be in uppercase
When a user write: smbmount //xxxxxx/pablo, the client ask for the
password and the mount point and then answer:
smbmnt must be installed suid root
mount failed
After that I changed the mode of /usr/bin/smbmnt to -rwsr-xr-x, but
when a user write: smbmount //xxxxxx/pablo, again the client ask for
the password and the mount point and answer:
cannot mount on /mnt/xxxxxx: Operation not permitted
mount failed
I even changed the mode of /mnt/xxxxxx to rwxrwxrwx and the same
answer.
For the second question I would like to have an script like this:
/usr/bin/smbmount //$1/$2 -c "mount /mnt/$1 -u 1000 -g 1000"
But it does not ask for the password and I do not want to give it in
the command line for security, I know in the smbclient man pages said
that "-c" suppresses the normal password prompt from the client to
the user. But I still would like to write everything on one line but
need to be asked for the password.
I appreciate any help.
More information about the samba
mailing list