Skip to content

Instantly share code, notes, and snippets.

@mgpradeepa
Last active June 7, 2018 05:44
Show Gist options
  • Save mgpradeepa/6de27302beb48a6a141cf1a2cb8c2d86 to your computer and use it in GitHub Desktop.
Save mgpradeepa/6de27302beb48a6a141cf1a2cb8c2d86 to your computer and use it in GitHub Desktop.
Create user
Login as root
$ sudo su -
$ useradd -m <userName> -p <password>
Add to the group
$ usermod -aG <someGroup> <userName>
For granting sudo or root access
visudo
For the group created
<someGroup> ALL=(ALL) ALL
$ su <userName> -
$ groups
<userName> <someGroup>
Just get confirmed
$ sudo whoami
..[Password for <userName>]
U will see root. -- hence root permission also granted.
support -- https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/2/html/Getting_Started_Guide/ch02s03.html
To change the password of a user
1. switch as root user
sudo su -
2. passwd <userName>
3. Provide the new password for the same.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment