Linux: Setup: Create a user and set password - eliminmax/cncs-journal GitHub Wiki
Meaning of different command prompts
Unix/Linux:$: can be run as normal user
Unix/Linux:#: must be run as root (or withsudo)
Windows:>: Command Prompt or PowerShell
Windows:PS>: PowerShell only
Unix/Linux and Windows:$/>,#/>: Works in Windows and Unix/Linux.
run the following, replcing <PLACEHOLDER_VALUES> as needed:
# useradd -d <HOMEDIR> -G <GROUPS> -s <SHELL> -m <USERNAME>
-
<HOMEDIR>: path to the new user's home directory -
<GROUPS>: should be a comma separated list of groups -
<SHELL>: shell that the user defaults to on login. If you're not sure, go with/bin/bash -
<USERNAME>name of the new user
To set the password for the new user, use the passwd command.
# passwd <USERNAME>
-
<USERNAME>: name of the user who's password is changing
If you are setting/resetting someone else's password, pass the -e flag to make change the password when they log in
# passwd -e <USERNAME>