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

Installing nginx 1.9.7 on Ubuntu 15.04 / 15.10 Tech
Samba and LDAP DO NOT MIX LDAP
Changing timezone in under Ubuntu & Debian Linux
Taking Ubuntu 12.04 Precise Pangolin for a spin Reviews
Weekend Server Overhaul IPv6
Ubuntu Edge – PR ploy or real shot? Android

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.

Copyright © 2026 Obviate.io.

Powered by PressBook Masonry Dark