Skip to content

Obviate.io

To anticipate and prevent

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

Related Posts

Hard to buy books via Brick & Mortar Anime
Ubuntu Edge – Not even close Hardware
Ubuntu Netbook Remix 9.10 Review Netbooks
Benchmarking: Ubuntu 9.04 i386 vs LPIA on Eee PC 1000 Netbooks
iPad vs Windows Pad (Dell XT2) Apple
Taking Ubuntu 12.04 Precise Pangolin for a spin Reviews

Leave a Reply Cancel reply

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

Copyright © 2026 Obviate.io.

Powered by PressBook Masonry Dark