1.2 KiB
1.2 KiB
Adding a new user
Check users that are logged
users
myuser
Creating a new user called "test"
sudo useradd -p -m test
The configuration file "useradd" sets options for this command:
sudo less /etc/default/useradd
# useradd defaults file for ArchLinux |
# original changes by TomK |
GROUP=users |
HOME=/home |
INACTIVE=-1 |
EXPIRE= |
SHELL=/bin/bash |
SKEL=/etc/skel |
CREATE_MAIL_SPOOL=no |
(END) |
PS: should use "sudo" to see the file. And less()
or more()
will show the file
The following file contains a list of fields about each user:
head -4 /etc/passwd
root❌0:0::/root:/bin/bash |
bin❌1:1::/:/sbin/nologin |
daemon❌2:2::/:/sbin/nologin |
mail❌8:12::/var/spool/mail:/sbin/nologin |
PS: head()
is used to show only the first four lines.