Page 209 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 209

Unit 11: User Accounts




          adding users                                                                          notes

          One of the most important activities in administering a Linux box is the addition of users. Here
          you’ll find some simple examples to provide a foundation for future unit. It is not intended to be
          comprehensive, but is a good memory refresher. You can use the command man useradd to get
          the help pages on adding users with the useradd command or the man usermod to become more
          familiar with modifying users with the usermod command.


             Did u know?  What are permissions to the root users?

          11.1.1 who is the super user?


          The super user with unrestricted access to all system resources and files in Linux is the user
          named root. This user has a user ID, of 0 which is universally identified by Linux applications
          as belonging to a user with supreme privileges. You will need to log in as user root to add new
          users to your Linux server.




             Note     When installing Ubuntu Linux systems, you are prompted to create a primary
             user that is not root. A root user is created but no password is set, so you initially cannot
             log in as this user.


          11.1.2 How to add users?

          Adding users takes some planning; read through these steps below before starting:
          1.   Arrange your list of users into groups by function. In this example there are three groups
               “parents”, “children” and “soho”.
               Parents    Children    Soho
               Paul       Alice       Accounts

               Jane       Derek       Sales
          2.   Add the Linux groups to your server:

               [root@bigboy tmp]# groupadd parents
               [root@bigboy tmp]# groupadd children
               [root@bigboy tmp]# groupadd soho
          3.   Add the Linux users and assign them to their respective groups
               [root@bigboy tmp]# useradd -g parents paul
               [root@bigboy tmp]# useradd -g parents jane
               [root@bigboy tmp]# useradd -g children derek
               [root@bigboy tmp]# useradd -g children alice

               [root@bigboy tmp]# useradd -g soho accounts
               [root@bigboy tmp]# useradd -g soho sales
               If you don’t specify the group with the -g, RedHat/Fedora Linux creates a group with
               the same name as the user you just created; this is also known as the User Private Group
               Scheme. When each new user first logs in, they are prompted for their new permanent
               password.

                                           LoveLy professionaL university                                   203
   204   205   206   207   208   209   210   211   212   213   214