Skip to content

Obviate.io

To anticipate and prevent

  • Home
  • About Us
  • History
  • Privacy Policy
  • Toggle search form

Non-interactive (Unattended) password change under Ubuntu

Posted on 2012-02-16 By Jon No Comments on Non-interactive (Unattended) password change under Ubuntu

Last night I had programmatically created a large number of users on a server. Today, I started getting emails from the users complaining that their new accounts didn’t work. Turns out my user creation script had not set their passwords correctly, so I needed to reset everyone’s password. Try as I might, I could not find an automagic method to do so with passwd; thankfully, it turns out there is another command to use for this.

With a bit of kicking around on google I found a

Linux forum post with a solution that actually worked under Ubuntu. Use chpasswd.

echo 'username:password'|chpasswd

Of course replace username and password with the proper values. You can either wrap this in a batch script, or utilize my method and build a command list in a Google Docs Spreadsheet (or Excel) to copy and paste en-mass. A few seconds later, everyone’s password was reset and I went back to reading reddit.

Ubuntu Tags:automated, chpasswd, encrypt, linux, non-interactive, passwd, password, Ubuntu, unattended, user

Post navigation

Previous Post: Happy Mass Effect 3 Demo Day!
Next Post: Recording high quality voice prompts for Asterisk

More Related Articles

Quick Review: Ubuntu Netbook Remix 10.04 Linux
WebDAV Clients – Linux & OSX Apple
WordPress: Enabling SSH/SFTP Updates Linux

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

February 2012
S M T W T F S
 1234
567891011
12131415161718
19202122232425
26272829  
« Jan   Mar »

Copyright © 2022 Obviate.io

Powered by PressBook Premium theme