Page 138 - DCAP106_OPERATING_SYSTEM_TOOLS
P. 138

Unit 8: Shell Commands




          8.1.3 User Account                                                                    Notes

          In  Linux,  you  can  access  to  almost  each  and  every  file  (configuration  files,  system,  text  files
          etc.)  with no restriction and interruption.  You need to be very careful while doing work as
          the root (super user). Thus, managing user accounts and groups is an important part of a system
          administrator.

                 Example:  An  organization  XYZ  consists  of  three  departments,  that  is,  Marketing,
          Technical and Account. Each department have 3–4 employees. The organization demands you to
          verify the users of marketing,  technical and account departments so that the employees of each
          group will be able to view his/her own department file.
          Given a situation, if you are familiar with the process of managing these accounts, you can easily
          set permissions for the users mentioned above.  If not, The commands given below are essential
          for the task.

          z z  useradd :  This command is used for creating user account.
               This command can be executed by administrators only. On debian, you should use adduser.
               For other options like adding expiry date, home directory etc., refer man useradd.

          z z  passwd : This command is used for changing user password.
               If the user has set password before, he/she will be prompted for the first password whereas
               superuser is permitted to bypass the step so that forgotten passwords may be changed.

          z z  usermod :  This command is used to modify user account.
          z z  userdel :  This command is used to delete a user account and related files. This command
               can be executed by administrators only.

          z z  groupadd :   This command is used to create a new group.
          z z  groupdel : This command is used delete the group and entries referring to the group.
          z z  groupmod :   This command is used to modify a group definition on the system.
          z z  chmod :   This command is used to modify properties for users.
          z z  chown : This command is used to change file owner and group.

          z z  chgrp :  This command is used to change group ownership.
          8.1.4 Network Commands

          Linux is mainly recognized for its use in servers. In 2009, it held a server market share ranging
          between 20–40%.
               !

             Caution It is necessary to know the commands to check the ip address, download files from
             the net, get DNS, etc.
          Various network commands are discussed below:

          z z  wget: This command is a non-interactive network downloader.
          z z  Even if a download fails because of a network problem, it will keep trying again and again
               until the complete file has been retrieved.   The server will instruct to continue to download
               from where it  it left off.
          z z  $ wget url-for-file.




                                           LOVELY PROFESSIONAL UNIVERSITY                                   131
   133   134   135   136   137   138   139   140   141   142   143