0
Create user accounts on remote servers complete with public key access and sudo access if desired. This is handy when you’re given the root account of a new VPS and want to create an account for yourself. It’s also great for adding a new user to multiple accounts in parallel.
Change root password
I run this when I’m given the root account of a new VPS.
$ cap deprec:users:passwd HOSTS=lucid1 USER=root
triggering load callbacks
* executing `deprec:connect_canonical_tasks'
* executing `deprec:users:passwd'
Enter userid |root|
Enter new password for root ********
Create a new user account
$ cap deprec:users:add HOSTS=lucid
triggering load callbacks
* executing `deprec:connect_canonical_tasks'
* executing `deprec:users:add'
Enter userid |mbailey|
Should this be an admin account? |no|
yes
Enter new password for mbailey ********
Re-enter new password for mbailey ********
Change other user’s password
This can be a lot quicker than SSH’ing into a number of hosts to change a user’s password.
$ cap deprec:users:passwd HOSTS=lucid1,lucid2,lucid3,lucid4
triggering load callbacks
* executing `deprec:connect_canonical_tasks'
* executing `deprec:users:passwd'
Enter userid |mbailey|
Enter new password for mbailey ********