Converting existing accounts to Userify Accounts

By design, Userify plays well with other management systems and does not manage user accounts that it did not create. (For example, root, backup, system accounts, etc.)

The trigger that tells Userify if it is dealing with a userify account is the presence of userify- in the comment field in /etc/passwd.

Hack on the shim at Github!

Curious as to how the shim code works? It's only about 450 lines of easy-to-read Python code. Review the code in a few minutes at Github and join us in making it better with your pull request.

Here is an example of updating user accounts that may already exist on a system to convert them to Userify users by changing those user's comment fields. (Note: if the username doesn't exist in Userify or does not have permissions in the server when executing this script, the user account will of course be removed as you would expect, but can easily be restored as soon as the user is created or granted permissions in Userify.)

You will need sudo access on the remote servers (meaning that you have root access granted in Userify) in order to make these user comment field changes.

#! /bin/bash

for un in bob alice
    cmd="$cmd; sudo usermod -c userify-legacy-$un $un"
for hn in hostname1 hostname2 hostname3
    echo "$cmd" | ssh $hn &