Thursday, 21 July 2022

User Management in Linux PART-5 |RHCSA |Part-22 | Practice in RHEL8 on AWS | Devops & Developer tool

 1.usermod -e - to Set Expiry Date of a User

  usermod -e <year-month-date> <username>

*to check this is set or not run Command cat /etc/shadow

2. usermod -f - To set Inactive period after password expiration

    usermod -f 2 <username>

3. usermod -l - To Change name of User

    usermod -l <new name> <user name>

4. usermod -L - to lock password of a particular User

    usermod -L <username>

 5. usermod -U - To Unlock Password of a particular user

    usermod -U <username>

 6. usermod -u - To change UID of a particular user

     usermod -u <new id no.> <username>

 7. usermod -s - This is Used for Changing Shell

     usermod -s <shell> <username>

 8. usermod -p <password> <username>

 9. how to use multiple options while creating user

   * first go in /etc/login.defs

   * CREATE_HOME - write 'no' in front of that

   useradd -c "comment" -md /home/remoteuser -e 2022-07-31 -G root,vasu -u 1066 -s /sbin/nologin <username>




No comments:

Post a Comment