Resize the logical volume vo and its filesystem to 290 MB. Make sure that the filesystem contents remain intact.
Note: Partitions are seldom exactly the same size requested, so a size within the range of 260 MB to 320 MiB is acceptable.
Solution:
df -hT
lvextend -L +100M /dev/vg0/vo
lvscan
xfs_growfs /home/ // home is LVM mounted directory
Note: This step is only need to do in our practice environment, you do not need to do in the real exam
resize2fs /dev/vg0/vo // Use this comand to update in the real exam df -hT
OR
e2fsck -f/dev/vg0/vo
umount /home
resize2fs /dev/vg0/vo required partition capacity such as 100M lvreduce -l 100M /dev/vg0/vo mount
/dev/vg0/vo /home
df –Ht
Does this meet the goal?
Correct Answer:
A
One Domain RHCE is configured in your lab, your domain server is server1.example.com. nisuser2001, nisuser2002, nisuser2003 user are created on your server 192.168.0.254:/rhome/stationx/nisuser2001. Make sure that when NIS user login in your system automatically mount the home directory. Home directory is separately shared on server /rhome/stationx/ where x is your Station number.
Solution:
use the authconfig --nisserver=
Example: authconfig --niserver=192.168.0.254 --nisdomain=RHCE --update or system-config-authentication
Click on Enable NIS
Type the NIS Domain: RHCE
Type Server 192.168.0.254 then click on next and ok
You will get a ok message.
Create a Directory /rhome/stationx where x is your station number.
vi /etc/auto.master and write at the end of file /rhome/stationx /etc/auto.home --timeout=60
vi /etc/auto.home and write
* -rw,soft,intr 192.168.0.254:/rhome/stationx/&
Note: please specify your station number in the place of x.
Service autofs restart
Login as the nisuser2001 or nisuser2002 on another terminal will be Success. According to question, RHCE domain is already configured. We have to make a client of RHCE domain and automatically mount the home directory on your system. To make a member of domain, we use the authconfig with option or system-config authentication command. There a are lots of authentication server i.e NIS, LDAB, SMB etc. NIS is a RPC related Services, no need to configure the DNS, we should specify the NIS server address.
Here Automount feature is available. When user tried to login, home directory will automatically mount. The automount service used the /etc/auto.master file. On
/etc/auto.master file we specified the mount point the configuration file for mount point.
Does this meet the goal?
Correct Answer:
A
Find the rows that contain abcde from file /etc/testfile, and write it to the file/tmp/testfile, and the sequence is requested as the same as /etc/testfile.
Solution:
# cat /etc/testfile | while read line;
do
echo $line | grep abcde | tee -a /tmp/testfile
done
OR
grep `abcde' /etc/testfile > /tmp/testfile
Does this meet the goal?
Correct Answer:
A
Part 1 (on Node1 Server)
Task 8 [Managing Local Users and Groups]
Create a user fred with a user ID 3945. Give the password as iamredhatman
Solution:
*
[root@node1 ~]# useradd -u 3945 fred
[root@node1 ~]# echo "iamredhatman" | passwd --stdin fred
Changing password for user fred.
passwd: all authentication tokens updated successfully
Does this meet the goal?
Correct Answer:
A
Create the following users, groups, and group memberships: A group named adminuser.
A user natasha who belongs to adminuser as a secondary group A user harry who also belongs to adminuser as a secondary group.
A user sarah who does not have access to an interactive shell on the system, and who is not a member of adminuser, natasha, harry, and sarah should all have the password of redhat.
Solution:
groupadd sysmgrs
useradd -G sysmgrs Natasha
We can verify the newly created user by cat /etc/passwd)
# useradd -G sysmgrs harry
# useradd -s /sbin/nologin sarrh
# passwd Natasha
# passwd harry
# passwd sarrah
Does this meet the goal?
Correct Answer:
A