[linux-cifs-client] Re: mount.cifs getting password from stdin

Paulo Trezentos Paulo.Trezentos at iscte.pt
Fri May 14 09:41:37 GMT 2004


Steven French wrote:
> 
> Instead of adding the -S mount option to mount.cifs parsing (to accept 
> password from stdin, e.g. in the case of pam_mount), I noticed that it 
> is possible already in the mount.cifs code to take a password from a 
> file descriptor (which can be set to zero for stdin) by exporting 
> environment variable "PASSWD_FD" as e.g. equal to "0"
> 
> I noticed the ncpfs man page says it accepts a mount option "pass-fd=0" 
> which I could also do to make sending the password via a filedescriptor 
> instead of on the command line, making it even easier, I an unsure 
> whether that longer form mount option (only) is better than adding a 
> short one char new mount option that only handles stdin (not other file 
> descriptors) especially since some might confuse the suggested one, -S, 
> with a meaning of "target server" (syntax that some of the Samba tools 
> use) which could cause usability problems.   I don't want to use 
> something that begins with "pass" though (so it does not cause conflicts 
> with the parsing for password itself) - so would like to use "pw-fd" or 
> someting similar as the new option
IMHO, rigth now there are two problems in integrating pam_mount and 
mount.cifs:
   1.- The mount.cifs not receiving the password through stdin
   2.- The pam_mount PAM module insert a "-S" option when calling 
mount.cifs that aborts mount.cifs. Is seems that "-S" in due to HP tool 
(http://www.docs.hp.com/hpux/onlinedocs/B8724-90044/B8724-90044.html). I 
don't know if there are other CIFS tools with "-S". Sharity seems that 
doesn't have it.

So, using another mount option or even the "pass-fd=0" only solves the 
first point.
In the case of using another option rather than "-S", I believe we 
should contact pam_mount development team to change it... But since HP 
depends on it, could be hard...

Best regards,


-- 
  _____________________________________________________
|Paulo Trezentos (Paulo.Trezentos at adetti.iscte.pt)
|http://paulo.trezentos.gul.pt
|ADETTI/RSI (IS/IT Research and Development)
|FP: 1B13 55A2 5045 2271 BA66  762B B2AE 7EC0 E4B3 0AB7



More information about the linux-cifs-client mailing list