Adding a new user for all nodes
We now proceed to implement the task components outlined earlier. First, we will add a new user to the pi home
directory that will have the same user ID for all pi
nodes at once. So, go ahead and list the current content of the home
directory: enter ls -la /home
at the $
prompt; see the following screenshot:
You see that it contains only the pi
user. Now enter sudo useradd -m -u 1960 alpha
. The parameter -m
specifies the home
directory, -u
is the argument for a new user ID, 1960
is your new user ID (or any integer you desire), and the name alpha
(or any name you desire) is what you want to associate with the user ID 1960
. Now check to see whether the alpha
, or the username you chose, was added to the home
directory. List the contents as you did earlier; see the following screenshot:
You see that the alpha
user was indeed added to the pi home
directory. This is great! The next thing you want to do is create a password for this newly created alpha
user...