Page 83 - DCAP602_NETWORK_OPERATING_SYSTEMS_I
P. 83

Unit 4: Configuring Desktop




          4.3 managing users                                                                    notes

          Almost all Linux distribution comes with its own set of GUI tools to manage users and groups.


                 Example:
          1.   Red Hat comes with redhat-config-user
          2.   Suse comes with Yast

          3.   Debian Linux and other distro come with users-admin GUI tool set
          4.   FreeBSD with sysinstall
          5.   Solaris comes with Solaris Management Centre (SMC)

          command Line user management

          Command line utilities let you create, modify, delete, and list both user and group accounts.

          user info

          The id command prints information for a certain user. Use it like this:
          # id usernameCreate a user

          to create a new user

          # useradd -c “My Example User” username
          # passwd username

          The created user is initially in an inactive state. To activate the user you have to assign a password
          with passwd. Some useful useradd options include the following:
          -c : sets a comment for the user.
          -s : is used in order to define the user’s default login shell. If not used, then the system’s default
          shell becomes the user’s default login shell.
          -r : creates a user with UID<500 (system account)
          -d : sets the user’s home directory. If not used, the default home directory is created (/home/
          username/)
          -M : the home directory is not created. This is useful when the directory already exists.
          To create a user that does not have the ability to login to a shell, issue the following commands:
          # useradd -c “This user cannot login to a shell” -s /sbin/nologin username

          # passwd username
          Change the User’s Password


          To change a user’s password:
          # passwd username
          If  it’s  used  without  specifying  a  username,  then  the  currently  logged  in  user’s  password  is
          changed.




                                           LoveLy professionaL university                                    77
   78   79   80   81   82   83   84   85   86   87   88