Chapter 5. Creating a Common User for All Nodes

Operating your supercomputer should be an effortless and pleasurable experience as you wield its massive power to crunch through difficult problems. Therefore, to facilitate this ease of use, we must create a common user for all nodes. This common user ties all the nodes together in one fell swoop, allowing you and the nodes to seamlessly communicate among themselves.

In this chapter, you will learn how to do the following:

  • Create a new user for the master node
  • Create a password for the new user on the master node
  • Create a new user for the slave1 node
  • Create a password for the new user on the slave1 node
  • Generate a special key on the master node for sshing effortlessly between the nodes in the supercomputer without using a password
  • Copy the special key from the master node to the slave1 node
  • Edit the .bashrc file on the master node to facilitate seamless special key access to all the nodes
  • Use the which command

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:

Adding a new user for all nodes

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:

Adding a new user for all nodes

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, so enter the command sudo passwd alpha, and enter a new password; see the following screenshot:

Adding a new user for all nodes

Note

For convenience, the author used the same password as that used for the Pi nodes.

Go ahead now and log in as the newly minted alpha user. Enter su - alpha (note there is a space before and after the hyphen). Enter your password, and you are now logged in as the alpha user (see the following screenshot ). Enter exit; you will be returned to the previous pi user:

Adding a new user for all nodes

Now ssh into the slave node (Slv1) and repeat the steps you just completed. Enter ssh Slv1, and enter your password (the author used the same password for all his nodes for convenience).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.221.0