Question 1(Practice, RHCE, Installation and Configuration (69 Questions))
SIMULATION
You have a domain in your LAN example.com. Configure to allow login to jack only from station10.example.com.
Answer is in the explanation below.
Reference / correct answer:
Dothefollowingstepsas:
1. vi /etc/security/access.conf
-:jack:ALL EXCEPT station10.example.com
2. vi /etc/pam.d/system-auth
account required /lib/security/pam_access.so
/etc/security/access.conf file helps to allow or deny login to users on the basis of origin.
Syntax of /etc/security/access.conf
permission : users : origins
The first field should be a "+" (access granted) or "-" (access denied) character.
The second field should be a list of one or more login names, group names, or ALL (always matches). A pattern of the form user@host is matched when the login name matches the "user" part, and when the "host" part matches the local machine name.
The third field should be a list of one or more tty names (for non-networked logins), host names, domain names (begin with "."), host addresses, internet network numbers (end with "."), ALL (always matches) or LOCAL (matches any string that does not contain a "." character).
The EXCEPT operator makes it possible to write very compact rules
Question 2(Practice - RHCT, Installation and Configuration (51 Questions))
SIMULATION
Change the Group Owner of /data to training group.
Answer is in the explanation below.
Reference / correct answer:
chownorchgrpcommandisusedtochangetheownership.
Syntax of chown: chown [-R] username:groupname file/directory
Syntax of chgrp: chgrp [-R] groupname file/directory
Whenever user creates the file or directory, the owner of that file/directory automatically will be that user and that user’s primary group name.
To change group owner ship
1. chgrp training /data Which set the Group Ownership to training
or
chown root.training /data Which set the user owner to root and group owner to training group.
Verify /data using: ls -ld /data
You will get: drwxr-xr-x 2 root training …………..
Question 3(Practice - RHCT, Installation and Configuration (51 Questions))
SIMULATION
Make Secondary belongs the both users on sysadmin group.
Answer is in the explanation below.
Reference / correct answer:
Dothefollowingstepsas:
1. usermod -G sysadmin john
2. usermod –G sysadmin jane
3. Verify by reading /etc/group file
Using usermod command we can make user belongs to different group. There are two types of group one primary and another is secondary. Primary group can be only one but user can belongs to more than one group as secondary.
usermod -g groupname username To change the primary group of the user
usermod -G groupname username To make user belongs to secondary group.
Limited Time Offer – Save Now!
Don’t miss out — get full access at the best price.