RHCSA Quick-Notes

Configure client to use ntp-server

# nano -w /etc/ntp.conf
Add line:
 server iburst
Remove lines:
 server 0 ....
 server 1 ....
 server 2 ....
# service ntpd restart
# chkconfig ntpd on

Resize logical volume (lv) mounted at /home

Reboot single usermode
Comment out /home in /etc/fstab

# init 1

Kill all services that are running by users other than root

# ps aux | grep -v "root"
# killall -u

List logical volumes, find mapper, resize removing 1 gigabyte (this includes filesystem resize):

# lvdisplay
# ls -l /dev/mapper
# lvresize -r -L-1G /dev/mapper/vg-somevg_lv-home

mount ldap user

Configure ldap

# system-config-authentication &

Test ldap

# getent passwd username
# cat /etc/auto.master
/home/guests /etc/auto.guests

# cat /etc/auto.guests
* -rw instructor.example.com:/home/guests/&

Restart autofs

#service autofs restart; chkconfig autofs on

Enable IP Forwarding

Open /etc/sysctl.conf file using a text editor, enter:

# nano -w /etc/sysctl.conf

Set net.ipv4.ip_forward to 1, enter:

net.ipv4.ip_forward = 1

Save and close the file. Reload the changes by typing the following command:

# sysctl -p

find files

find files under /home, its owner is user2 but is not in gourp user2, copy these file to /root/backup

# mkdir /root/backup
# find /home -user user2 !-group user2 -exec cp -ar{} /root/backup \;

Leave a Reply

Your email address will not be published. Required fields are marked *