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. set the root password, press Ctrl + Alt + T to bring up the ubuntu command box, enter sudopasswdroot in the command box, and then press... 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.
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.