Ubuntu default only the installation of the account is the system administrator account, will not give root user rights.
under the Administrator account, using the passwd command to root a password, you can use root .
however, when using useradd, If you do not add a parameter, you are adding a regular account. How to add a new system administrator account
#USERADD-MR * * *(the name of the account you want to add) then
# PADDWD * * * ( newly added account name )
whereuseradd 's parameter description can be viewed using useradd--help .
-M creates the account home directory, which is not created by default.
-R to create a system administrator account
Another parameter -S was not understood at the time, only to be found when problems arose.
When you create a user this way, when you switch to that user, you find thatthe ll command doesn't work, and the environment doesn't seem to be the default bash.
Yes,ubuntu Create new user The default environment is not bash, pit.
specific ubuntu The default value for creating new users can be viewed using the useradd-d command.
Home=/home
Inactive=-1
Expire=
Shell=/bin/sh
Skel=/etc/skel
Create_mail_spool=no
sure enough, the default is sh instead of the default bash like bird Brother with CentOS.
to use bash as the default shell environment, you will need the following:
# useradd-s/BIN/BASH-MR * * *
modifies the default shell environment.
there is another way to change the shell Environment, which is to modify the/etc/passwd file.
The end of your new account is your default shell environment.
However, it is best to create an account when it was modified, after all, modify the file error-prone.
I add an account here using root, however, the system administrator can also add the system administrator account, do not need to use root
usage:$sudo useradd-s/BIN/BASH-MR * * * can. After all , you can use root without rootand reduce risk.
Ubuntu Add Admin user