i use the linux system
and show me the command?
Below are the commands with syntax and examples.
1)Add a user
Syntax :
adduser <userNAme>
Ex:
adduser user1
2) Set the user password
Syntax :
passwd <username>
Ex:
passwd password1
The /etc/shadow file stores contain the password information for the user account. So to view you can use below command
$ sudo cat /etc/shadow
3) Create a group
sudo groupadd queries // create a group called queries
4)Add user to group
useradd -g queries Jay //Add a new user called Jay to group called queries
To view group you have created , use below command
cat /etc/group
5)Switch to user
Syntax:
su username // su means substitute user
ex: su Jay
6)To see the logged user, use below command
whoami
Get Answers For Free
Most questions answered within 1 hours.