RHCSA Tasks Flashcards

1
Q

Reset Forgotten Root Password:

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Extending logical volume

A

Cannot extend dynamically

umount /mount

lvextend -L 1G /dev/vg00/lv1

for ext:
resizefs /dev/vg00/lv1

for xfs:
xfsgrowfs /dev/vg00/lv1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

To grow the logical volume while still mounted

A

To increase the size to 900MB

lvresize -L 900M /dev/vg00/lv1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Label a filesystem

A

xfs_admin -L “filesystem1” /dev/sda1

tune2fs -L “filesystem2” /dev/sda2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Set fsck to 2 and dump to 1 in fstab

A

LABEL=filesystem2 /mnt/mount2 ext4 defaults 1 2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Set the default permissions on dir1 to read, write and execute for the starbuck user; execute only if it is a directory.

A

setfacl -d -m u:starbuck:rwX dir1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly