Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 72197 - Invalid smbmount error message
Summary: Invalid smbmount error message
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-23 00:23 UTC by Steven Wagner
Modified: 2004-11-29 12:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Wagner 2004-11-23 00:23:46 UTC
I have the smbfs share defined in my fstab as
//NAS/DISK\0401    /net/nas   smbfs     user,password=blah    0 0

running the command  'mount /net/nas'  as a user produces the error msg. "14069: session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
SMB connection failed"
...This error message seems to imply that the password is being passed to the remote host and is being rejected, this could also possibly point to a problem in the configuration accesing a guest share.

But to our dismay, this error message is completely misleading.  Simply doing a su to root and mounting the drive as root solves the problem.  If this same operation is attempting using parameters directly from the command line and not using the fstab, then the user is told right away that only root can perform the operation.
Comment 1 Carsten Lohrke (RETIRED) gentoo-dev 2004-11-23 05:03:14 UTC
which samba/ebuild version?
Comment 2 Christian Andreetta (RETIRED) gentoo-dev 2004-11-23 05:26:57 UTC
maybe root does benefit of greater share info: try with parameters like 'workgroup=...,username=...,noetbiosname,...' (man smbmount: the same options are valid for fstab as well, since smbmount is called from the mount command)
Comment 3 Steven Wagner 2004-11-23 08:30:14 UTC
net-fs/samba-3.0.8

That is strange...when I add the username= parameter to my fstab, the error message changes to:
  cannot mount on /net/nas: Operation not permitted
  smbmnt failed: 1
which if a much better error. Still don't see much reason to the whole process though. I suppose Ill try and get this upstream to the samba people. Anyone know how to make the share user mountable?
Comment 4 Christian Andreetta (RETIRED) gentoo-dev 2004-11-24 01:13:26 UTC
that's not samba, but kernel.
a valid command is (from simple user):
'smbmount //[workstation_name]/[share] [local_mount_point] -o username=administrator,password=[admin_pwd],workgroup=[workgroup_or_domain]'

If the local user cannot write to/doesn't own the [local_mount_point], the 'operation not permitted' error is returned (infact, this is a local error)
Comment 5 Steven Wagner 2004-11-24 11:45:33 UTC
Yes, that is a valid kernel error msg.  But the first error from my original post looks like a bug in samba.
Comment 6 Christian Andreetta (RETIRED) gentoo-dev 2004-11-25 01:30:02 UTC
The first error was due to a fstab line which, passed to the mount prg, becomes:
'smbmount //NAS/DISK\0401 /net/nas -o password=blah' (with the permissions of the calling user, but _not_ his credentials, since there's no 'user=...' parameter: you're identifying yourself as the remote guest user).
If your intentions were to mount the share with different credentials for each user doing the mount, that's not the way. For instance, a bash script doing a smbmount (automatically at logons?) could be the way: smbmount is installed with suid root bit active.
This seems only a conf bug: marking as closed, since samba is behaving correctly.
If I misundertood something, please reopen. :-)
Comment 7 Steven Wagner 2004-11-29 12:02:51 UTC
I see what you are saying. What I don't understand though is, why does it work with the same fstab line when I mount the share while I am root?  I am not mounting with any special credentials...just guest really.  I am using a linksys USB network attached storage server.  I use password=blah because I am always prompted for a password for some reason.