-
Notifications
You must be signed in to change notification settings - Fork 0
/
linux grupos usuarios e comandos.txt
126 lines (123 loc) · 3.98 KB
/
linux grupos usuarios e comandos.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
sudo useradd ahitt
[sudo] password for everton:
useradd: user 'ahitt' already exists
useradd ahitt
useradd: user 'ahitt' already exists
useradd ctee
useradd: user 'ctee' already exists
sudo useradd kath
sudo useradd ahitt
useradd: user 'ahitt' already exists
usermod -c "representante de vendas" ahitt
usermod: Permission denied.
usermod: cannot lock /etc/passwd; try again later.
sudo usermod -c "representante de vendas" ahitt
sudo usermod -e 2024-10-25
Usage: usermod [options] LOGIN
Options:
-b, --badnames allow bad names
-c, --comment COMMENT new value of the GECOS field
-d, --home HOME_DIR new home directory for the user account
-e, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE
-f, --inactive INACTIVE set password inactive after expiration
to INACTIVE
-g, --gid GROUP force use GROUP as new primary group
-G, --groups GROUPS new list of supplementary GROUPS
-a, --append append the user to the supplemental GROUPS
mentioned by the -G option without removing
the user from other groups
-h, --help display this help message and exit
-l, --login NEW_LOGIN new value of the login name
-L, --lock lock the user account
-m, --move-home move contents of the home directory to the
new location (use only with -d)
-o, --non-unique allow using duplicate (non-unique) UID
-p, --password PASSWORD use encrypted password for the new password
-R, --root CHROOT_DIR directory to chroot into
-P, --prefix PREFIX_DIR prefix directory where are located the /etc/* files
-s, --shell SHELL new login shell for the user account
-u, --uid UID new UID for the user account
-U, --unlock unlock the user account
-v, --add-subuids FIRST-LAST add range of subordinate uids
-V, --del-subuids FIRST-LAST remove range of subordinate uids
-w, --add-subgids FIRST-LAST add range of subordinate gids
-W, --del-subgids FIRST-LAST remove range of subordinate gids
-Z, --selinux-user SEUSER new SELinux user mapping for the user account
sudo usermod -c "repreeentante de vendas" ahitt -e 2024-10-25
sudo usermod -c "gerente de rh" ctee -e 2024-10-25
pwd
/home/everton
sudo usermod ahitt -p P@ssword1234!!
sudo usermod ahitt -p P@ssword1234pwd
sudo getent passwd | cut -d: -f1
root
daemon
bin
sys
sync
games
man
lp
mail
news
uucp
proxy
www-data
backup
list
irc
gnats
nobody
systemd-network
systemd-resolve
systemd-timesync
messagebus
syslog
_apt
tss
uuidd
tcpdump
sshd
landscape
pollinate
everton
ahitt
ctee
kath
sudo groupadd vendas
sudo groupadd rh
sudo groupadd pessoal
sudo groupadd CEO
sudo groupadd expedicao
sudo groupadd gerentes
sudo gpasswd -a ahitt vendas
Adding user ahitt to group vendas
sudo gpasswd -a ctee rh
Adding user ctee to group rh
sudo gpasswd -a ctee gerentes
Adding user ctee to group gerentes
#aswd gerentes fancyawesomeunicornsuperlong123!!!
pwd
/home/everton
sudo groupadd vendas
groupadd: group 'vendas' already exists
sudo groupadd rh
groupadd: group 'rh' already exists
sudo groupadd financas
sudo groupadd pessoal
groupadd: group 'pessoal' already exists
sudo groupadd CEO
groupadd: group 'CEO' already exists
sudo groupadd expedicao
groupadd: group 'expedicao' already exists
sudo groupadd gerentes
groupadd: group 'gerentes' already exists
sudo -a -G vendas ahitt
usage: sudo -h | -K | -k | -V
usage: sudo -v [-AknS] [-g group] [-h host] [-p prompt] [-u user]
usage: sudo -l [-AknS] [-g group] [-h host] [-p prompt] [-U user] [-u user]
[command]
usage: sudo [-AbEHknPS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
prompt] [-T timeout] [-u user] [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-AknS] [-r role] [-t type] [-C num] [-g group] [-h host] [-p
prompt] [-T timeout] [-u user] file ...