Change password without typing?;
I feel I should assume that my company runs keyloggers at work. I'm fine with this but I would like to change my password everytime I log in. I can't do this by typing of course though.
So how can I change my password without typing it? - I've ruled out ssh keyauth for same reasons as above. The only stumbling I have is getting /sbin/passwd to set a passwd from sdin (grepped from a file of pre-selected paswords). I've also thought about trying to encrypt a password (with chpasswd or mcrypt?) and replace it in /etc/shadow though this is not ideal as it might go very wrong; backups of /etc/shadow a good idea!. I feel this is a very simple thing and I'm amazed it seems as if it hasn't been done before. (I asked a similar question before but I thought I'd simplify the question: older more detailed thread ) |
The man page for passwd give us...
--stdin This option is used to indicate that passwd should read the new password from standard input, which can be a pipe. Isn't this exactly the question you asked? |
All times are GMT -5. The time now is 10:13 AM. |