RHCSA Tasks Flashcards
Reset Forgotten Root Password:
1) Reset Linux server
2) Press e to edit the GRUB menu
3) Go to the end of the line starting with linux16 and enter rd.break
4) Press crtl-x
5) at prompt # mount -o remount,rw /sysroot
6) chroot /sysroot
7) passwd
8) touch /.autorelabel
Extending logical volume
Cannot extend dynamically
umount /mount
lvextend -L 1G /dev/vg00/lv1
for ext:
resizefs /dev/vg00/lv1
for xfs:
xfsgrowfs /dev/vg00/lv1
To grow the logical volume while still mounted
To increase the size to 900MB
lvresize -L 900M /dev/vg00/lv1
Label a filesystem
xfs_admin -L “filesystem1” /dev/sda1
tune2fs -L “filesystem2” /dev/sda2
Set fsck to 2 and dump to 1 in fstab
LABEL=filesystem2 /mnt/mount2 ext4 defaults 1 2
Set the default permissions on dir1 to read, write and execute for the starbuck user; execute only if it is a directory.
setfacl -d -m u:starbuck:rwX dir1