I tried to mount a Samba file share using //fileserver/share /media/fileserver cifs credentials=/home/mward/.fileserver 0 0 in /etc/fstab. It failed. Doing an strace on mount.cifs shows it's including the newline from /home/mward/.fileserver (i.e. it is sending password\n instead of password). It should read the password line from the credentials file without the \n.
It sounds like this was also a problem in 2004, but should have been fixed then (presumably in Samba 2.x). http://lists.samba.org/archive/linux-cifs-client/2004-April/000131.html
Was reported a few days ago (see URL) and a patch was provided. Not sure if it's been checked in upstream yet.
it's upstream, will be fixed shortly.
Upstream bug report is https://bugzilla.samba.org/show_bug.cgi?id=5434
Changing version to '9' as part of upcoming Fedora 9 GA. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Here is my quick ack to get around this problem: awk 'BEGIN { printf("%s\n%s","username=myusername","password=mypassword")}' >/tmp/credentials Then cp /tmp/credentials /etc/credentials BINGO, this does it! Brgds, Eduard Vopicka
To add some version numbers: F8 with samba-common-3.0.28a-0.fc8 works and mounts fine. Copied the config files over to F9 with samba-common-3.2.0-1.pre3.9.fc9.i386 and this failed with NT_STATUS_LOGON_FAILURE. Eduard's workaround mounted the shares AOK after a reboot - thanks for the tip.
Looks like this should now be fixed in current samba-client packages. I'm going to close this as fixed. Please reopen if that isn't the case.
Requesting this issue be reopened. This is not fixed in the current samba-client packages on RHEL 5.4 (samba-client 3.0.33-3.15.el5_4). Still have to use the AWK trick above to satisfy the issue. The EOL (\n) is still being sent to samba included in the password string. I pulled out my hair for about 2 hours trying to locate the issue and why the NT (AD) account kept locking out due to bad password. Please fix this ASAP, as this is required for a critical production system.
This is a Fedora bug, and it's not broken in Fedora currently. We're aware of the regression in RHEL. Please see bug 532153.