Ubuntu Create user commands

Source: Internet
Author: User

You can use AddUser and useradd to add users and use Userdel to delete users.

The simplest of commands:
sudo adduser test
Group with the same name, create/home/test/, copy files from etc/skel/, and set password and associated initial identity information

command of the original point:
sudo useradd-mk/home/test2-s/bin/bash test2
sudo passwd test2

If you break this step down one-by-one to do:
sudo mkdir/home/test3
sudo useradd-d/home/test3-s/bin/bash test3
sudo chown test3:test3/home/test3
sudo cp/etc/skel/*/home/test3
sudo passwd test3

To delete a user:
sudo userdel test
Rm-rf/home/test

Add sudo permissions to the user

1, after root access, enter the command under root, you can modify your user rights (for example: usermod-a-G sudo lhj) is to give Lhj added sudo permissions.

2, or in the/etc/group file inside the SUDO:X:27:LHJ,LH. LHJ and LH are also added sudo permissions,

Ubuntu Create user commands

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.