In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you the difference between useradd and adduser commands in ubuntu. The content is concise and easy to understand. It will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
To create a new user in Ubuntu, you usually use two commands: useradd and adduser. Although the function is the same, the usage is not the same:
1. When using useradd, if you do not add any parameter options later, for example: the user created by # sudo useradd test will be the default "three nots" user: one without Home Directory, two without password, and three without system Shell.
two。 When using adduser, the process of creating users is more like a man-machine conversation. You will be prompted to enter all kinds of information, and then you will create new users based on that information.
Useradd is an ELF executable program
Useradd adds the user name and creates the same group name as the user name, but it does not create a user name-based directory under the / home directory, nor does it prompt for a new password.
-b,-base-dir BASE_DIR specifies the base directory of the home directory
-d,-home-dir HOME_DIR specifies the home directory
-g,-gid GROUP specify gid
-l.-no-log-init do not add the user to the lastlog and.
Faillog databases
Do not add a user to lastlog and failog. This user's login record does not need to be recorded.
-M,-no-create-home do not create a home directory
-p,-password PASSWORD specify the password of the new user
-r,-system set up a system account
-s,-shell SHELL specifies shell
Adduser-m-d / usr/system-s / bin/bash-p passwd system
Adduser is a perl script that can interactively set some user parameters.
Question:
The-p parameter of adduser does not allow shadow password
The parameters of / usr/sbin/usermod and useradd are similar.
Usermod-password PASSWORD username
The above is what is the difference between useradd and adduser commands in ubuntu. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.