Differences between setting the root password and useradd and adduser in Ubuntu

Source: Internet
Author: User

The difference between setting the root password and useradd and adduser in Ubuntu has recently started to learn about Ubuntu. During the first learning process, two problems were encountered: 1. How to set the root password press Ctrl + Alt + T to bring up the ubuntu command box, enter "sudo passwd root" in the Command box, and enter the corresponding password as prompted. Ii. Differences between useradd and adduser 1. useradd creates a user using useradd. If no Parameter options are added later, for example, the user created by useradd test will be the default "Three none" User: no Home Directory, no password, no system Shell. The format of the useradd command is as follows: useradd [-d home] [-s shell] [-c comment] [-m [-k template] [-f inactive] [-e expire] [-p passwd] [-r] The meanings of the parameters of the above command are as follows: -d: Specify the start directory when the user logs on. -S: Specifies the shell used after the user logs on. -C: add the remarks text. The remarks text is saved in the remarks column of passwd. -M: automatically creates a user's logon directory. -F: specifies the number of days after the password expires. -E: Specifies the validity period of the Account, which is permanently valid by default. -P: password of the specified user. -R: Create a system account. 2. When adduser uses adduser, the user creation process is more like a human-machine conversation. The system will prompt you to enter various information and then help you create a new user based on the information. In short, adduser is more suitable for novice users in Ubuntun and does not need to remember the tedious Parameter options. Just follow the system prompts to proceed step by step, the disadvantage is that the entire creation process is complicated and long. Useradd is suitable for users with some advanced experience. As long as the Linux Command is well mastered, you can easily create system users.

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.