Linux (About adding / removing users)

Last time, I explained about users.

Let's learn about adding / deleting user accounts here. Basically, user-related operations are performed as root, so let's create a user using the su </ b> / sudo </ b> command learned last time.

About useradd Let's create a user at once. Use the useradd command.
root    #  useradd neko

A neko user is created by entering the above command. When the user is created, check the contents of / etc / passwd </ b> Let's check if it has been created.

cat /etc/passwd

The neko user is displayed on the last line.

About passwd Let's set the password of the created user. Use the passwd command. This also requires root privileges.
root    #  passwd neko

You can set the password with the above command. After that, you can log in as a neko user when selecting a user to log in.

About userdel Use userdel to delete a user. It also removes the user's home directory, so use the -r (remove) option as well. It's tedious, but it's done with root privileges.
root    #  userdel -r neko

Check / etc / passwd </ b> to see if it has been deleted.

that's all,,

  • useradd
  • passwd
  • userdel

It was about the user.

Next → About the group