0% found this document useful (0 votes)
126 views22 pages

Desktop Documents Downloads Music Pictures Public Templates Videos

The document contains the output of various Linux commands run by a user named Shimaa on their system. It shows Shimaa navigating the file system, creating and listing files and directories, getting information about users and permissions, and checking disk usage and system resources. At the end, Shimaa uses sudo to switch to the root user and create some test files and directories as root in locations like /test and /var/db.

Uploaded by

Shaimaa Ashraf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
126 views22 pages

Desktop Documents Downloads Music Pictures Public Templates Videos

The document contains the output of various Linux commands run by a user named Shimaa on their system. It shows Shimaa navigating the file system, creating and listing files and directories, getting information about users and permissions, and checking disk usage and system resources. At the end, Shimaa uses sudo to switch to the root user and create some test files and directories as root in locations like /test and /var/db.

Uploaded by

Shaimaa Ashraf
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 22

[Shimaa@localhost ~]$ df -h /home

Filesystem Size Used Avail Use% Mounted on

/dev/mapper/rhel-home 3.0G 69M 3.0G 3% /home

[Shimaa@localhost ~]$ df -h /etc

Filesystem Size Used Avail Use% Mounted on

/dev/mapper/rhel-root 8.0G 4.1G 4.0G 52% /

[Shimaa@localhost ~]$ df -h /var

Filesystem Size Used Avail Use% Mounted on

/dev/mapper/rhel-var 6.0G 263M 5.8G 5% /var

[Shimaa@localhost ~]$ df -h /bin

Filesystem Size Used Avail Use% Mounted on

/dev/mapper/rhel-root 8.0G 4.1G 4.0G 52% /

[Shimaa@localhost ~]$ df -h /usr

Filesystem Size Used Avail Use% Mounted on

/dev/mapper/rhel-root 8.0G 4.1G 4.0G 52% /

[Shimaa@localhost ~]$ df -h /boot

Filesystem Size Used Avail Use% Mounted on

/dev/nvme0n1p1 1014M 243M 772M 24% /boot

[Shimaa@localhost ~]$ free -m

total used free shared buff/cache available

Mem: 1790 1128 85 19 576 493

Swap: 2047 6 2041

[Shimaa@localhost ~]$ whoami

Shimaa

[Shimaa@localhost ~]$ pwd

/home/Shimaa

[Shimaa@localhost ~]$ ls

Desktop Documents Downloads Music Pictures Public Templates Videos

[Shimaa@localhost ~]$ touch file1


[Shimaa@localhost ~]$ touch file2

[Shimaa@localhost ~]$ ls

Desktop Documents Downloads file1 file2 Music Pictures Public Templates Videos

[Shimaa@localhost ~]$ whoami

Shimaa

[Shimaa@localhost ~]$ id -u shimaa

id: ‘shimaa’: no such user

[Shimaa@localhost ~]$ id -u Shimaa

1000

[Shimaa@localhost ~]$ id -u root

[Shimaa@localhost ~]$ id -u amr

id: ‘amr’: no such user

[Shimaa@localhost ~]$ id -u mail

[Shimaa@localhost ~]$ ls /bin/ | wc - l

1534 1534 15797 -

wc: l: No such file or directory

1534 1534 15797 total

[Shimaa@localhost ~]$ ls /bin/ | wc-l

bash: wc-l: command not found...

[Shimaa@localhost ~]$ ls /sbin/ | wc -l

597

[Shimaa@localhost ~]$ ls /proc

1 1099 151 169 1984 488 514 541 570 620 7016 7124 7219 7379 882 945 dma
mdstat thread-self

10 11 152 17 1987 489 515 542 572 621 7027 713 7222 7380 886 946 driver
meminfo timer_list

1000 1103 153 170 2 490 516 544 573 6598 7056 7130 7225 7383 887 947 execdomains
misc tty
1016 1104 154 171 20 491 517 545 575 673 706 7139 7227 7387 9 948 fb modules
uptime

1020 1186 155 172 21 493 518 546 576 6737 707 714 7242 7402 929 949 filesystems
mounts version

1022 1188 156 173 22 494 519 548 577 6742 7076 7146 7254 7406 930 981 fs mtrr
vmallocinfo

1027 12 157 174 23 495 521 55 578 6750 708 7151 7256 7630 931 985 interrupts net
vmstat

1029 13 158 175 24 496 523 550 580 6752 7086 7159 7258 7709 932 987 iomem
pagetypeinfo zoneinfo

1032 1301 159 176 25 497 524 551 582 682 709 7169 7266 7716 933 999 ioports
partitions

1034 1312 16 177 26 498 526 553 597 6873 7091 7170 7268 7725 934 acpi irq
sched_debug

1039 1314 160 178 27 500 527 555 599 6927 7096 7176 7271 7726 935 asound kallsyms
schedstat

1043 1319 161 179 28 502 529 557 6 6935 7099 7182 7273 7816 936 buddyinfo kcore
scsi

1047 1326 162 18 29 504 530 559 601 6940 710 7183 7277 7821 937 bus keys self

1049 1349 163 180 3 505 531 561 603 6955 7103 7192 7282 8036 938 cgroups key-users
slabinfo

1051 1355 164 181 30 506 532 562 605 6960 7104 7193 7288 8104 939 cmdline kmsg
softirqs

1057 1356 165 182 31 507 533 563 607 6970 7106 7196 7301 8105 940 consoles
kpagecgroup stat

1058 14 166 183 32 508 535 564 609 6974 711 7199 7329 811 941 cpuinfo kpagecount
swaps

1059 148 167 184 322 509 537 566 612 6978 7112 7208 7343 8114 942 crypto kpageflags
sys

1072 149 1674 186 33 511 538 567 614 6982 7118 7216 7356 851 943 devices loadavg
sysrq-trigger

1089 150 168 19 4 513 539 569 616 7 712 7218 7373 881 944 diskstats locks sysvipc

[Shimaa@localhost ~]$ top -p 4


top - 00:38:17 up 12 min, 1 user, load average: 0.02, 0.23, 0.28

Tasks: 1 total, 0 running, 1 sleeping, 0 stopped, 0 zombie

%Cpu(s): 0.3 us, 0.3 sy, 0.0 ni, 98.7 id, 0.0 wa, 0.3 hi, 0.3 si, 0.0 st

MiB Mem : 1790.4 total, 73.0 free, 1144.9 used, 572.5 buff/cache

MiB Swap: 2048.0 total, 2040.2 free, 7.8 used. 475.1 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND

4 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 rcu_par_gp

[Shimaa@localhost ~]$ pwd

/home/Shimaa

[Shimaa@localhost ~]$ cd /var/db

[Shimaa@localhost db]$ pwd

/var/db

[Shimaa@localhost db]$ cd /home/Shimaa

[Shimaa@localhost ~]$ pwd

/home/Shimaa

[Shimaa@localhost ~]$ ls

Desktop Documents Downloads file1 file2 Music Pictures Public Templates Videos

[Shimaa@localhost ~]$ cd Desktop/project1

bash: cd: Desktop/project1: No such file or directory

[Shimaa@localhost ~]$ cd Desktop

[Shimaa@localhost Desktop]$ pwd

/home/Shimaa/Desktop

[Shimaa@localhost Desktop]$ ls

[Shimaa@localhost Desktop]$ mkdir project1

[Shimaa@localhost Desktop]$ ls
project1

[Shimaa@localhost Desktop]$ cd project1

[Shimaa@localhost project1]$ cd ..

[Shimaa@localhost Desktop]$ pwd

/home/Shimaa/Desktop

[Shimaa@localhost Desktop]$ ls

project1

[Shimaa@localhost Desktop]$ cd ..

[Shimaa@localhost ~]$ pwd

/home/Shimaa

[Shimaa@localhost ~]$ ls

Desktop Documents Downloads file1 file2 Music Pictures Public Templates Videos

[Shimaa@localhost ~]$ pwd

/home/Shimaa

[Shimaa@localhost ~]$ cd Desktop/project1

[Shimaa@localhost project1]$ history

1 df -h /home

2 df -h /etc

3 df -h /var

4 df -h /bin

5 df -h /usr

6 df -h /boot

7 free -m

8 whoami

9 pwd

10 ls

11 touch file1

12 touch file2

13 ls
14 whoami

15 id -u shimaa

16 id -u Shimaa

17 id -u root

18 id -u amr

19 id -u mail

20 ls /bin/ | wc - l

21 ls /bin/ | wc-l

22 ls /sbin/ | wc -l

23 ls /proc

24 top -p 4

25 top -p 4012

26 pwd

27 cd /var/db

28 pwd

29 cd /home/Shimaa

30 pwd

31 ls

32 cd Desktop/project1

33 cd Desktop

34 pwd

35 ls

36 mkdir project1

37 ls

38 cd project1

39 cd ..

40 pwd

41 ls

42 cd ..
43 pwd

44 ls

45 pwd

46 cd Desktop/project1

47 history

[Shimaa@localhost project1]$ ls

[Shimaa@localhost project1]$ cd /home/Shimaa/

[Shimaa@localhost ~]$ ls

Desktop Documents Downloads file1 file2 Music Pictures Public Templates Videos

[Shimaa@localhost ~]$ ls --inode

2097295 Desktop 4214926 Downloads 171 file2 6291599 Pictures 6291598 Templates

2097296 Documents 170 file1 4214927 Music 149 Public 150 Videos

[Shimaa@localhost ~]$ ls -i

2097295 Desktop 4214926 Downloads 171 file2 6291599 Pictures 6291598 Templates

2097296 Documents 170 file1 4214927 Music 149 Public 150 Videos

[Shimaa@localhost ~]$ ls -a

. .bash_logout .bashrc .config Documents .esd_auth file2 .local Music .pki Templates

.. .bash_profile .cache Desktop Downloads file1 .ICEauthority .mozilla Pictures Public Videos

[Shimaa@localhost ~]$ ls

Desktop Documents Downloads file1 file2 Music Pictures Public Templates Videos

[Shimaa@localhost ~]$ ls -i -a

131 . 134 .bashrc 2097296 Documents 171 file2 4214927 Music 6291598
Templates

128 .. 6291586 .cache 4214926 Downloads 138 .ICEauthority 6291599 Pictures 150
Videos

132 .bash_logout 135 .config 136 .esd_auth 137 .local 6291602 .pki

133 .bash_profile 2097295 Desktop 170 file1 2097280 .mozilla 149 Public

[Shimaa@localhost ~]$ ls -ia

131 . 134 .bashrc 2097296 Documents 171 file2 4214927 Music 6291598
Templates
128 .. 6291586 .cache 4214926 Downloads 138 .ICEauthority 6291599 Pictures 150
Videos

132 .bash_logout 135 .config 136 .esd_auth 137 .local 6291602 .pki

133 .bash_profile 2097295 Desktop 170 file1 2097280 .mozilla 149 Public

[Shimaa@localhost ~]$ id -u Shimaa

1000

[Shimaa@localhost ~]$ id -u /var

id: ‘/var’: no such user

[Shimaa@localhost ~]$ top -p 4^C

[Shimaa@localhost ~]$ ls -i/var

ls: invalid option -- '/'

Try 'ls --help' for more information.

[Shimaa@localhost ~]$ ls -i /var

12583085 account 159 crash 136 ftp 144 kerberos 133 lock 12583053 nis 132 run
8409246 yp

135 adm 8409242 db 4194439 games 131 lib 134 log 139 opt 8409245 spool

4194437 cache 12583051 empty 8409243 gopher 8409244 local 138 mail 4194441 preserve
4194442 tmp

[Shimaa@localhost ~]$ ls -i /var

12583085 account 159 crash 136 ftp 144 kerberos 133 lock 12583053 nis 132 run
8409246 yp

135 adm 8409242 db 4194439 games 131 lib 134 log 139 opt 8409245 spool

4194437 cache 12583051 empty 8409243 gopher 8409244 local 138 mail 4194441 preserve
4194442 tmp

[Shimaa@localhost ~]$ whoami

Shimaa

[Shimaa@localhost ~]$ su - root

Password:

[root@localhost ~]# whoami

root
[root@localhost ~]# mkdir /test

[root@localhost ~]# pwd

/root

[root@localhost ~]# cd /test

[root@localhost test]# ls

[root@localhost test]# pwd

/test

[root@localhost test]# touch file1

[root@localhost test]# touch "myfile"

[root@localhost test]# touch .file2

[root@localhost test]# mkdir dir1

[root@localhost test]# mkdir "newfolder"

[root@localhost test]# mkdir .priate

[root@localhost test]# mkdir ".private lname"

[root@localhost test]# ls

dir1 file1 myfile newfolder

[root@localhost test]# ls -a

. .. dir1 file1 .file2 myfile newfolder .priate '.private lname'

[root@localhost test]# ls --all

. .. dir1 file1 .file2 myfile newfolder .priate '.private lname'

[root@localhost test]# mkdir /var/db/dir2

[root@localhost test]# touch /var/db/linux

[root@localhost test]# ls /var/db/

dir2 linux sudo

[root@localhost test]# pwd

/test

[root@localhost test]# ls

dir1 file1 myfile newfolder

[root@localhost test]# ls /var/db/


dir2 linux sudo

[root@localhost test]# cp file1 /var/db

[root@localhost test]# cp dir1 /var/db -r

[root@localhost test]# ls /var/db/

dir1 dir2 file1 linux sudo

[root@localhost test]# pwd

/test

[root@localhost test]# ls

dir1 file1 myfile newfolder

[root@localhost test]# mv "myfile" /var/db

[root@localhost test]# mv "newfolder" /var/db

[root@localhost test]# ls /var/db

dir1 dir2 file1 linux myfile newfolder sudo

[root@localhost test]# pwd

/test

[root@localhost test]# ls

dir1 file1

[root@localhost test]# mv file1 course

[root@localhost test]# mv dir1 senior

[root@localhost test]# ls

course senior

[root@localhost test]# rm -f course

[root@localhost test]# rm -rf senior/

[root@localhost test]# ls

[root@localhost test]# ls -a

. .. .file2 .priate '.private lname'

[root@localhost test]# ls

[root@localhost test]#

root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin

daemon:x:2:2:daemon:/sbin:/sbin/nologin

adm:x:3:4:adm:/var/adm:/sbin/nologin

lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin

sync:x:5:0:sync:/sbin:/bin/sync

shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown

halt:x:7:0:halt:/sbin:/sbin/halt

mail:x:8:12:mail:/var/spool/mail:/sbin/nologin

operator:x:11:0:operator:/root:/sbin/nologin

games:x:12:100:games:/usr/games:/sbin/nologin

ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin

nobody:x:65534:65534:Kernel Overflow User:/:/sbin/nologin

dbus:x:81:81:System message bus:/:/sbin/nologin

systemd-coredump:x:999:997:systemd Core Dumper:/:/sbin/nologin

systemd-resolve:x:193:193:systemd Resolver:/:/sbin/nologin

tss:x:59:59:Account used for TPM access:/dev/null:/sbin/nologin

polkitd:x:998:996:User for polkitd:/:/sbin/nologin

geoclue:x:997:995:User for geoclue:/var/lib/geoclue:/sbin/nologin

rtkit:x:172:172:RealtimeKit:/proc:/sbin/nologin

pipewire:x:996:992:PipeWire System Daemon:/var/run/pipewire:/sbin/nologin

pulse:x:171:171:PulseAudio System Daemon:/var/run/pulse:/sbin/nologin

libstoragemgmt:x:995:989:daemon account for libstoragemgmt:/var/run/lsm:/sbin/nologin

qemu:x:107:107:qemu user:/:/sbin/nologin

clevis:x:994:988:Clevis Decryption Framework unprivileged user:/var/cache/clevis:/sbin/nologin

usbmuxd:x:113:113:usbmuxd user:/:/sbin/nologin

unbound:x:993:987:Unbound DNS resolver:/etc/unbound:/sbin/nologin

gluster:x:992:986:GlusterFS daemons:/run/gluster:/sbin/nologin

rpc:x:32:32:Rpcbind Daemon:/var/lib/rpcbind:/sbin/nologin

avahi:x:70:70:Avahi mDNS/DNS-SD Stack:/var/run/avahi-daemon:/sbin/nologin


setroubleshoot:x:991:984::/var/lib/setroubleshoot:/sbin/nologin

setroubleshoot:x:991:984::/var/lib/setroubleshoot:/sbin/nologin

saslauth:x:990:76:Saslauthd user:/run/saslauthd:/sbin/nologin

dnsmasq:x:983:983:Dnsmasq DHCP and DNS server:/var/lib/dnsmasq:/sbin/nologin

radvd:x:75:75:radvd user:/:/sbin/nologin

sssd:x:982:982:User for sssd:/:/sbin/nologin

cockpit-ws:x:981:980:User for cockpit web service:/nonexisting:/sbin/nologin

:q!

[root@localhost test]# ls

[root@localhost test]# vim /etc/passwd

[root@localhost test]# vim /etc/passwd

[root@localhost test]# vi /etc/passwd

[root@localhost test]# ls

[root@localhost test]# vim admin1

[root@localhost test]# vim admin1

[root@localhost test]# cat admin1

welcome to linux course

this is test file

thanks

[root@localhost test]# vim admin1

[root@localhost test]# cat admin1

welcome to linux course

this is test file

thanks

[root@localhost test]# head / tail / cat / wc^C

[root@localhost test]# wc -l /etc/passwd

46 /etc/passwd

[root@localhost test]# head /etc/passwd

root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin

daemon:x:2:2:daemon:/sbin:/sbin/nologin

adm:x:3:4:adm:/var/adm:/sbin/nologin

lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin

sync:x:5:0:sync:/sbin:/bin/sync

shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown

halt:x:7:0:halt:/sbin:/sbin/halt

mail:x:8:12:mail:/var/spool/mail:/sbin/nologin

operator:x:11:0:operator:/root:/sbin/nologin

[root@localhost test]# head -n 3 /etc/passwd

root:x:0:0:root:/root:/bin/bash

bin:x:1:1:bin:/bin:/sbin/nologin

daemon:x:2:2:daemon:/sbin:/sbin/nologin

[root@localhost test]# tail /etc/passwd

cockpit-wsinstance:x:980:979:User for cockpit-ws instances:/nonexisting:/sbin/nologin

chrony:x:979:978::/var/lib/chrony:/sbin/nologin

flatpak:x:978:977:User for flatpak system helper:/:/sbin/nologin

colord:x:977:976:User for colord:/var/lib/colord:/sbin/nologin

rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin

gdm:x:42:42::/var/lib/gdm:/sbin/nologin

gnome-initial-setup:x:976:975::/run/gnome-initial-setup/:/sbin/nologin

sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin

tcpdump:x:72:72::/:/sbin/nologin

Shimaa:x:1000:1000:Shimaa Ashraf:/home/Shimaa:/bin/bash

[root@localhost test]# tail /etc/passwd^C

[root@localhost test]# tail -n 5 /etc/passwd^C

[root@localhost test]# mkdir / touch / cp / mv / rm / su / cat / head / tail / wc / vi/vim^C

[root@localhost test]# id Shimaa

uid=1000(Shimaa) gid=1000(Shimaa) groups=1000(Shimaa)


[root@localhost test]# id root

uid=0(root) gid=0(root) groups=0(root)

[root@localhost test]# id senior

id: ‘senior’: no such user

[root@localhost test]# useradd senior

[root@localhost test]# wc -l /etc/shadow

47 /etc/shadow

[root@localhost test]# grep senior /etc/shadow

senior:!!:19192:0:99999:7:::

[root@localhost test]# SHA512^C

[root@localhost test]#

uid=0(root) gid=0(root) groups=0(root)

[root@localhost test]# id senior

id: ‘senior’: no such user

[root@localhost test]# useradd senior

[root@localhost test]# wc -l /etc/shadow

47 /etc/shadow

[root@localhost test]# grep senior /etc/shadow

senior:!!:19192:0:99999:7:::

[root@localhost test]# SHA512^C

[root@localhost test]# grep Shimaa /etc/shadow

Shimaa:
$6$KpOrU1ubsi6B924n$dkOVjYcTHx304lxlsn4CKHFxA6NNO1btkTaHzKMscGe.3Tup1E7bkMnzqQbhiIcUE
ULr0iOQ9WGdkkmLBEzZS0::0:99999:7:::

[root@localhost test]# grep senior /etc/shadow

senior:!!:19192:0:99999:7:::

[root@localhost test]# grep senior /etc/passwd

senior:x:1001:1001::/home/senior:/bin/bash

[root@localhost test]# which nologin


/usr/sbin/nologin

[root@localhost test]# which java

/usr/bin/which: no java in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)

[root@localhost test]# which nologin

/usr/sbin/nologin

[root@localhost test]# useradd dhcp -u 500 -G adm -md /var/dhcp -s /usr/sbin/nologin

[root@localhost test]# cd dhcp

-bash: cd: dhcp: No such file or directory

[root@localhost test]# id dhcp

uid=500(dhcp) gid=1002(dhcp) groups=1002(dhcp),4(adm)

[root@localhost test]# id senior

uid=1001(senior) gid=1001(senior) groups=1001(senior)

[root@localhost test]# grep dhcp /etc/passwd

dhcp:x:500:1002::/var/dhcp:/usr/sbin/nologin

[root@localhost test]# grep dhcp /etc/passwd

dhcp:x:500:1002::/var/dhcp:/usr/sbin/nologin

[root@localhost test]# passwd senior

Changing password for user senior.

New password:

BAD PASSWORD: The password is shorter than 8 characters

Retype new password:

passwd: all authentication tokens updated successfully.

[root@localhost test]# grep senior /etc/shadow

senior:$6$HOGTJ5hwl1LtfUKx$Vt3NZM0RdzSYK//OVuZnQELbq/SHwuKChhe0mu/
3.KbJ8lVZizMDG0ZvciKZL53JWLw9Wu630ieoGyfM9bOhg0:19193:0:99999:7:::

[root@localhost test]# id senior

uid=1001(senior) gid=1001(senior) groups=1001(senior)

[root@localhost test]#

[root@localhost test]# usermod senior -u 10000 -G adm


[root@localhost test]# id senior

uid=10000(senior) gid=1001(senior) groups=1001(senior),4(adm)

[root@localhost test]# grep senior /etc/passwd

senior:x:10000:1001::/home/senior:/bin/bash

[root@localhost test]# usermod senior -l ahmed

[root@localhost test]# id senior

id: ‘senior’: no such user

[root@localhost test]# id ahmed

uid=10000(ahmed) gid=1001(senior) groups=1001(senior),4(adm)

[root@localhost test]# usermod ahmed -l senior

[root@localhost test]# id ahmed

id: ‘ahmed’: no such user

[root@localhost test]# id senior

uid=10000(senior) gid=1001(senior) groups=1001(senior),4(adm)

[root@localhost test]# id dhcp

uid=500(dhcp) gid=1002(dhcp) groups=1002(dhcp),4(adm)

[root@localhost test]# ls /home/

senior Shimaa

[root@localhost test]# userdel -r senior

[root@localhost test]# userdel dhcp

[root@localhost test]# ls /var/

account cache db empty games kerberos local log nis preserve spool yp

adm crash dhcp ftp gopher lib lock mail opt run tmp

[root@localhost test]# ls /home/

Shimaa

[root@localhost test]# id dhcp

id: ‘dhcp’: no such user

[root@localhost test]# id senior

id: ‘senior’: no such user


[root@localhost test]# id ahmed

id: ‘ahmed’: no such user

[root@localhost test]# groupadd sales

[root@localhost test]# grep sales /etc/group

sales:x:1001:

[root@localhost test]# cat /etc/group

root:x:0:

bin:x:1:

daemon:x:2:

sys:x:3:

adm:x:4:

tty:x:5:

disk:x:6:

lp:x:7:

mem:x:8:

kmem:x:9:

wheel:x:10:

cdrom:x:11:

mail:x:12:

man:x:15:

dialout:x:18:

floppy:x:19:

games:x:20:

tape:x:33:

video:x:39:

ftp:x:50:

lock:x:54:

audio:x:63:

users:x:100:
nobody:x:65534:

dbus:x:81:

utmp:x:22:

utempter:x:35:

input:x:999:

kvm:x:36:qemu

render:x:998:

systemd-journal:x:190:

systemd-coredump:x:997:

systemd-resolve:x:193:

tss:x:59:clevis

polkitd:x:996:

geoclue:x:995:

ssh_keys:x:994:

printadmin:x:993:

rtkit:x:172:

pipewire:x:992:

pulse-access:x:991:

pulse-rt:x:990:

pulse:x:171:

libstoragemgmt:x:989:

qemu:x:107:

clevis:x:988:

usbmuxd:x:113:

unbound:x:987:

gluster:x:986:

rpc:x:32:

avahi:x:70:

brlapi:x:985:
setroubleshoot:x:984:

saslauth:x:76:

dnsmasq:x:983:

radvd:x:75:

sssd:x:982:

libvirt:x:981:

cockpit-ws:x:980:

cockpit-wsinstance:x:979:

chrony:x:978:

flatpak:x:977:

colord:x:976:

rpcuser:x:29:

gdm:x:42:

gnome-initial-setup:x:975:

sshd:x:74:

slocate:x:21:

tcpdump:x:72:

Shimaa:x:1000:

sales:x:1001:

[root@localhost test]# grep sales /etc/group

sales:x:1001:

[root@localhost test]#

sales:x:1001:

[root@localhost test]# vim /etc/group

[root@localhost test]# id Shimaa

uid=1000(Shimaa) gid=1000(Shimaa) groups=1000(Shimaa),1001(sales)

[root@localhost test]# grep sales /etc/group

sales:x:1001:Shimaa,root,user1

[root@localhost test]# vim /etc/group


[root@localhost test]# id Shimaa

uid=1000(Shimaa) gid=1000(Shimaa) groups=1000(Shimaa),4(adm),10(wheel),1001(sales)

[root@localhost test]# groupmod sales -n marketing

[root@localhost test]# grep sales /etc/group

[root@localhost test]# grep marketing

^C

[root@localhost test]# grep marketing /etc/group

marketing:x:1001:Shimaa,root,user1

[root@localhost test]# id Shimaa

uid=1000(Shimaa) gid=1000(Shimaa) groups=1000(Shimaa),4(adm),10(wheel),1001(marketing)

[root@localhost test]# useradd user1

[root@localhost test]# passwd user1

Changing password for user user1.

New password:

BAD PASSWORD: The password contains the user name in some form

Retype new password:

Sorry, passwords do not match.

passwd: Authentication token manipulation error

[root@localhost test]#

[root@localhost test]#

[root@localhost test]#

[root@localhost test]#

[root@localhost test]# useradd user1

useradd: user 'user1' already exists


[root@localhost test]# passwd user1

Changing password for user user1.

New password:

BAD PASSWORD: The password is shorter than 8 characters

Retype new password:

Sorry, passwords do not match.

passwd: Authentication token manipulation error

[root@localhost test]# passwd user1

Changing password for user user1.

New password:

BAD PASSWORD: The password is shorter than 8 characters

Retype new password:

passwd: all authentication tokens updated successfully.

[root@localhost test]# su -user1

Try 'su --help' for more information.

[root@localhost test]# su - user1

[user1@localhost ~]$ sudo useradd user2

We trust you have received the usual lecture from the local System

Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.

#2) Think before you type.

#3) With great power comes great responsibility.

[sudo] password for user1:

user1 is not in the sudoers file. This incident will be reported.

[user1@localhost ~]$ id user2

id: ‘user2’: no such user


[user1@localhost ~]$ su - root

Password:

[root@localhost ~]# vim /etc/sudoers

[root@localhost ~]# su - user1

[user1@localhost ~]$ id user2

id: ‘user2’: no such user

[user1@localhost ~]$ sudo useradd user2

[sudo] password for user1:

[user1@localhost ~]$ id user2

uid=1002(user2) gid=1003(user2) groups=1003(user2)

[user1@localhost ~]$ useradd / usermod / userdel / which / passwd / grep / sodo / groupadd /
groupmod / groupdel^C

[user1@localhost ~]$

You might also like