- You will be given the ftp URL where the kernel is available.
- Open that URL in different tab
- Note down your current kernel name in PAPER (#uname -r)
- Download all the kernel files(kernel-*) using #wget from the given URL i.e. opened in different tab of base m/c
- Note: Ideally 2 files will be there inside the kernel directory of the given URL: eg
- 1: kernel-<version>.rpm
- 2: kernel-firmware-<version>.rpm
- write down the new kernel version which is going to be installed in the PAPER
- It will be downloaded into the current directory
- Install it using #rpm
- #rpm -ivh kernrl-* --force --->may take 2-3 mins to install
- Check in file
- #vim /boot/grub/grub.conf
- <you will see 2 kernels in the kernel/Title section, old & new. For the system to install with new kernel, defaults=0 (zero) , so first one should be the new kernel which is required>
- #reboot
- To verify press esc and verify your kernel name which is going to boot.
- After booting is done, verify the new kernel (#uname -r)
Saturday, 6 July 2013
Installing New Kernel
Friday, 5 July 2013
Configure variable=value(sysvctl=1) in kernel Parameter
In exam question would be asked to ensure sysvctl=1 is available as a kernel parameter and it should reflect in /proc/cmdline
Make the corresponding changes in
#vim /boot/grub/grub.conf
<update the required thing eg . sysvctl=1 at the end of kernel section,>
save & quit
Note: This question will come after installing the new kernel question
Make the corresponding changes in
#vim /boot/grub/grub.conf
<update the required thing eg . sysvctl=1 at the end of kernel section,>
save & quit
Note: This question will come after installing the new kernel question
Saturday, 22 June 2013
FIND and grep Command
Q: Find all files owned by user1, and copy it to the /root/user2 directory while perserving the permission
Note: '-p' preserves the user/group/chmod permissions
Q: To redirect the contents of /etc/passwd to another file
#cat /etc/passwd > /user/test
#grep root /user/test | sed 's/root/ROOT/g' | sort > /home/user/file1.txt
- first find how many required files are available of for user1
- find / -user user1
- mkdir /root/user2
- find /home -user user1 -exec cp -p {} /root/user2 \;
- ls -al /root/user2 (to verify all files are available)
- or run find / -user user1 again, it will show files available in /root/user2 as well
Note: '-p' preserves the user/group/chmod permissions
Q: To redirect the contents of /etc/passwd to another file
#cat /etc/passwd > /user/test
#grep root /user/test | sed 's/root/ROOT/g' | sort > /home/user/file1.txt
Configuring File Services, FTP
#yum install vsftpd
#service vsftpd restart
#chkconfig vsftpd on

Note: Home/default directory of anonymous(unknown)/FTP user is /var/ftp/
Default user: FTP Password: FTP
FTP allows anonymous users to login, without password but it doesn't allow normal user to login with credentials.
Below is login with ftp/ftp
Now login with user subh/subh
#service vsftpd restart
#chkconfig vsftpd on
Note: Home/default directory of anonymous(unknown)/FTP user is /var/ftp/
Default user: FTP Password: FTP
FTP allows anonymous users to login, without password but it doesn't allow normal user to login with credentials.
Below is login with ftp/ftp
FTP didn't allow access of home directory of normal user because Selinux Booleans for 'ftp_home_directory' is 'off'.
Now we set Selinux Booleans for 'ftp_home_dir' to 'on'
#setsebool -P ftp_home_dir on --> It takes time, as the change is permanent.
#getsebool -a | grep ftp
Now we will try login ftp with user 'subh/subh:
To come out of FTP, use 'bye'
Configuring Web Services, HTTP
#yum install httpd --> You need to be root to install any package.
#service httpd restart
#chkconfig httpd on --> It will ensure httpd will be started on the required run level
Note: Home/default directory of httpd is /var/www/html/
Download the file from the given URL in the question to your home directory or to the location mentioned using wget:
Note: Refrain using 'move' unless mentioned in question. Because 'mv' will not allow to open the web page due to the selinux set up.
If in exam 'move' is mentioned, do below steps:
#mv index.html /var/www/html
#cd /var/www/html
#restorecon * --> It sets the selinux of the selinux context of the file similar to the parent folder
#service httpd restart
#chkconfig httpd on --> It will ensure httpd will be started on the required run level
Note: Home/default directory of httpd is /var/www/html/
Download the file from the given URL in the question to your home directory or to the location mentioned using wget:
Now we have to copy this file 'index.html' from home directory to '/var/www/html'
#cp index.html /var/www/htmlNote: Refrain using 'move' unless mentioned in question. Because 'mv' will not allow to open the web page due to the selinux set up.
If in exam 'move' is mentioned, do below steps:
#mv index.html /var/www/html
#cd /var/www/html
#restorecon * --> It sets the selinux of the selinux context of the file similar to the parent folder
Configuring Printer
Note: Hostname/IP of printer will be given in question
#system-config-printer
You will get below window:
Click on 'New'
Click on 'Forward'
Click 'Forward'
#system-config-printer
You will get below window:
Click on 'New'
Click on 'Network Printer'
Click on 'Internet Printing Protocol' (IPP)
Host: As per Question
Queue: /printer/LLC (Don't remove /printer, add your printer name given in question after '/printer/')Click on 'Forward'
Select "Generic" if nothing is mentioned in question.
Click 'Forward'
'Printer Name': Modify as per Question
Click on 'Apply'
LDAP and autofs
#system-config-authentication
You will get below window:
Select 'LDAP' from 'User Account Database' tab.

LDAP Search Base DN: Enter as per question
LDAP Server: Enter as per question
Check "Use TLS to encrypt connections
Click on 'Download CA Certificate
You will get below window:
You will get below window:
Select 'LDAP' from 'User Account Database' tab.

LDAP Search Base DN: Enter as per question
LDAP Server: Enter as per question
Check "Use TLS to encrypt connections
Click on 'Download CA Certificate
You will get below window:
Enter 'Certificate URL' : Given in question.
Click on 'OK'
Select 'LDAP password' from the 'Authentication Method'
Click on 'Apply'
Question will also ask to configure that ldap user ldapuser15 should get his home directory using autofs and should have read write access
#getent passwd ldapuser15
(if we do su - ldapuser15 without configuring autofs then it will complain that no home directory available)
then congiure the autofs (ensure it will have nfs version 3)
- #vim /etc/auto.master
- enter following in the line
- /home /etc/auto.ldap
- #vim /etc/auto.ldap (this file will not be there, we need to create it)
- enter following in the line
- ldapuser16 -rw,vers=3 <nfs/ldap server name>:/home/guests/ldapuser16
- service autofs reload
- chkconfig autofs on
Subscribe to:
Posts (Atom)















