[linux-cifs-client] How to stop cifs from printing passwords to the console?

a.nielsen at research.uq.edu.au a.nielsen at research.uq.edu.au
Tue Jul 26 04:54:58 GMT 2005


Hi Steven,

Sorry for taking so long to reply - during boot these messages are printed:
(the CIFS ones that mention the password don't end up in syslog and aren't
reported by dmesg.)  Sorry about having to edit the messages, but <username>
is my actual username, and likewise <password> is for real too.

... 
ReiserFS: sda4: checking transaction log (sda4)
ReiserFS: sda4: Using r5 hash to sort names
/dev/sda4 on /home type reiserfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
 
 parsing options:
rw,nosuid,nodev,noperm,uid=1000,gid=100,domain=UQ,file_mode=0640,dir_mode=07
50,credentials=/root/.cifs/user
 mount error: could not find target server. TCP name server2/share2 not
found  rc = 4
No ip address specified and hostname not found
 
 parsing options:
rw,nosuid,nodev,user,noperm,uid=1000,gid=100,domain=UQ,credentials=/root/.ci
fs/user
skipping empty user mount parameter
 
mount.cifs kernel mount options
unc=//server\share,ip=x.x.x.x,user=<username>,pass=<password>,ver=1,rw,nosui
d,nodev,,,,,,noperm,uid=1000,gid=100,domain=UQ,credentials=/root/.cifs/user
 CIFS VFS: Error connecting to IPv4 socket. Aborting operation
 CIFS VFS: cifs_mount failed w/return code = -101
mount error 101 = Network is unreachable
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
Using /etc/random-seed to initialize /dev/urandom.
INIT: Entering runlevel: 3
Going multiuser...
...

I think you were right though when you mentioned the -v option - my distro's
init scripts run the command "mount -a -v -t nonfs,nosmbfs,noproc" during
boot, which would account for (a) the messages being printed and (b) the
fact that they're mounted before the network comes up.  That should be
easily fixed.

Just a thought though, is it worth putting in code to hide the password so
that you can still use -v safely?

Thanks for your help!
Adam.

________________________________

From: Steven French [mailto:sfrench at us.ibm.com] 
Sent: Wednesday, 13 July 2005 7:33 AM
To: a.nielsen at research.uq.edu.au
Cc: linux-cifs-client at lists.samba.org
Subject: Re: [linux-cifs-client] How to stop cifs from printing passwords to
the console?



This is puzzling since the mount.cifs does not display the actual parms
passed internally to mount unless you mount with "--verbose" (or
equivalently -v) mount option.

The cifs kernel code does not print the password in any case that I see to
dmesg. I also did some experiments to verity this with old mount.cifs
(version 1.3) and cifs.ko

What is the format of the message being displayed - it would be helpful if I
could tell if it were the kernel or mount.cifs userspace code printing this.

Which version of cifs.ko and mount.cifs?


Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench at-sign us dot ibm dot com
Inactive hide details for
a.nielsen at research.uq.edu.aua.nielsen@research.uq.edu.au



More information about the linux-cifs-client mailing list