DevOps/Cloud By GK
  • DevOps/Cloud Introduction
  • 🚩AWS
    • Create AWS Account
    • Launch EC2 Instance
  • 🚩Linux
    • User Managment
      • Adding the User to Sudo group
      • visudo
    • Directory / File Management
      • Vi
      • Changing Permissions (chmod)
      • Filtering IO/File
    • Memory Management
    • Process Management
    • Network Management
    • Service Management
    • Environmental Variables
      • $PATH
    • Utilities
    • SHELL PROGRAMMING
      • Hello World
      • Variables
      • Command Line arguments
      • Conditional Statements
      • Array
      • Loops
      • Functions
      • AWK
      • sed
      • Example Useful Scripts
      • Basic -> Advanced
  • 🚩git
    • Introduction
    • Creating GitHub Account
    • Installation
      • Git Bash In Windows
      • Git In VS Code
      • Git In Eclipse
      • Git CLI in Linux
  • Creating Git Remote Repository
  • Git Commands L -> R
  • Git Commands L <- R
  • Git Branch Commands
  • Using SSH (Password Less)
  • 🚩maven
    • Introduction
    • Installation
    • POM.xml
    • Goals
  • 🚩SonarQube
    • Introduction
    • Sonar Cloud
    • Creating Project In SonarCloud
    • Installing Sonar-Scanner
    • Triggering Scan
  • 🚩Nexus
    • Introduction
    • Installation of Nexus
    • Creating Repository
    • Uploading Artifacts to Repository
  • 🚩Jenkins
    • Introduction
    • Installation of Jenkins
    • First Job In Jenkins
    • Git + Jenkins
      • WebHook
    • Maven + Jenkins
    • Sonar-Scanner + Jenkins
    • Nexus + Jenkins
Powered by GitBook
On this page
  1. Linux

User Managment

Here are some user management commands in Linux with examples:

  1. Create a new user:

    useradd john

    This command creates a new user account named "john".

  2. Set/change password for a user:

    passwd john

    This command allows you to set or change the password for the user "john".

  3. Modify user properties:

    usermod -aG sudo john

    This command adds the user "john" to the "sudo" group, granting them administrative privileges.

  4. Delete a user:

    userdel john

    This command deletes the user account "john".

  5. Display user and group information:

    id john

    This command displays the user and group information for the user "john".

  6. Switch to another user account:

    su - john

    This command allows you to switch to the user account "john".

  7. Execute a command with administrative privileges:

    sudo apt-get update

    This command executes the "apt-get update" command with root privileges.

  8. Configure password expiry information:

    chage -l john

    This command displays the password expiry information for the user "john".

  9. Lock or unlock a user account:

    usermod -L john

    This command locks the user account "john".

    usermod -U john

    This command unlocks the user account "john".

PreviousLaunch EC2 InstanceNextAdding the User to Sudo group

Last updated 2 years ago

🚩