10 Linux Shell Tricks You Don’t Already Know. Really, we swear.
The Venture Cake Weblog introduces 10 uncommon terminal commands — although you won’t be needing these commands on a daily basis, they’re good to keep in your back pocket. Included in the ten is one particularly interesting command that demonstrates how to generate a random password for a new user.
5. Set a Random Initial Password, That Must be Changed
There’s a lot of organizations who have nice, secure policies for passwords. Passwords stored on Windows machines. Linux is either not covered by the policy or the policy is routinely violated – people have idea about Linux authentication (most people don’t quite understand PAM, and Linux admins don’t often realize Linux can quite happily authenticate to Active Directory) and once upon a time, the OpenSSH developers didn’t like PAM (that’s since changed).
To set password that must be changed upon first login.
umask u=rw,go=
openssl rand -base64 6 | tee -a PasswordFile | passwd –stdin joe
chage -d 0 joe
The password is saved to PasswordFile , which only your own account can read. Then contact via some medium you consider relatively secure – like a phone call or encrypted email and them tell their initial password.
10 Linux Shell Tricks You Don’t Already Know. Really, we swear. - [Venture Cake]
2 opinions for 10 Linux Shell Tricks You Don’t Already Know. Really, we swear.
Blue Net Support » Blog Archive
Jan 13, 2008 at 4:59 pm
[…] 10 Linux Shell Tricks You Don’t Already Know. Really, we swear. June 24th, 2007 02:24[…] 10 Linux Shell Tricks You Don’t Already Know. Really, we swear. - [Venture Cake] […] […]
Claudio Izzi
Apr 10, 2008 at 4:29 pm
For any of you new to linux who would like a place to practice your shell commands and try out different things with linux without paying for it there’s an educational site called http://www.learningshells.com , accounts are created within the same day.
Have an opinion? Leave a comment: