Add a cron schedule to take full backup of /home on every day at 5:30 pm to /dev/st0 device.
Answer and Explanation:
1.vi /var/schedule
30 17 * * * /sbin/dump -0u /dev/st0 /dev/hda7
2.crontab /var/schedule
3.service crond restart
We can add the cron schedule either by specifying the scripts path on /etc/crontab file or by creating on text file on crontab pattern.
cron helps to schedule on recurring events. Pattern of cron is:
MinuteHourDay of MonthMonth Day of WeekCommands
0-590-231-311-120-7 where 0 and 7 means Sunday.
Note * means every. To execute the command on every two minutes */2.
Quota is implemented on /data but not working properly. Find out the
Problem and implement the quota to user1 to have a soft limit 60 inodes
(files) and hard limit of 70 inodes (files).
Answer and Explanation:
Quotas are used to limit a user's or a group of users' ability to consume disk space. This prevents a small group of users from monopolizing disk capacity and potentially interfering with other users or the entire system. Disk quotas are commonly used by ISPs, by Web hosting companies, on FTP sites, and on corporate file servers to ensure continued availability of their systems.
Without quotas, one or more users can upload files on an FTP server to the point of filling a filesystem. Once the affected partition is full, other users are effectively denied upload access to the disk. This is also a reason to mount different filesystem directories on different partitions. For example, if you only had partitions for your root (/) directory and swap space, someone uploading to your computer could fill up all of the space in your root directory (/). Without at least a little free space in the root directory (/), your system could become unstable or even crash.
You have two ways to set quotas for users. You can limit users by inodes or by kilobyte-sized disk blocks. Every Linux file requires an inode. Therefore, you can limit users by the number of files or by absolute space. You can set up different quotas for different filesystems. For example, you can set different quotas for users on the /home and /tmp directories if they are mounted on their own partitions.
Limits on disk blocks restrict the amount of disk space available to a user on your system. Older versions of Red Hat Linux included LinuxConf, which included a graphical tool to configure quotas. As of this writing, Red Hat no longer has a graphical quota configuration tool. Today, you can configure quotas on RHEL only through the command line interface.
1. vi /etc/fstab
/dev/hda11/data ext3defaults,usrquota 1 2
2. Either Reboot the System or remount the partition.
Mount –o remount /dev/hda11 /data
3. touch /data/aquota.user
4. quotacheck –ufm /data
5. quotaon -u /data
6. edquota –u user1 /data
and Specified the Soft limit and hard limit on opened file.
To verify either quota is working or not:
Soft limit specify the limit to generate warnings to users and hard limit can’t cross by the user. Use the quota command or repquota command to monitor the quota information.
One Logical Volume named lv1 is created under vg0. The Initial Size of that Logical Volume is 100MB. Now you required the size 500MB. Make successfully the size of that Logical Volume 500M without losing any data. As well as size should be increased online.
Answer and Explanation:
The LVM system organizes hard disks into Logical Volume (LV) groups. Essentially, physical hard disk partitions (or possibly RAID arrays) are set up in a bunch of equal-sized chunks known as Physical Extents (PE). As there are several other concepts associated with the LVM system, let's start with some basic definitions:
1. Verify the size of Logical Volume: lvdisplay /dev/vg0/lv1
2. Verify the Size on mounted directory: df –h or df –h mounted directory name
3. Use : lvextend –L+400M /dev/vg0/lv1
4. ext2online –d /dev/vg0/lv1 to bring extended size online.
5. Again Verify using lvdisplay and df –h command.
There is a server having 172.24.254.254 and 172.25.254.254. Your System lies on 172.24.0.0/16. Make successfully ping to 172.25.254.254 by Assigning following IP:
172.24.0.x Where x is your station number.
Answer and Explanation:
In the lab server is playing the role of router, IP forwarding is enabled. Just set the Correct IP and gateway, you can ping to 172.25.254.254.
You are giving the debug RHCT exam. The examiner told you that the password of root is redhat. When you tried to login displays the error message and redisplayed the login screen. You changed the root password, again unable to login as a root. How will you make Successfully Login as a root.
Answer and Explanation:
When root unable to login into the system think:
Do these Steps:
If account is expired, set net expire date: chage –E “NEVER” root
Create one partitions having size 100MB and mount it on /data.
Answer and Explanation:
Or
mke2fs –j /dev/hda? To create ext3 filesystem.
Write:
/dev/hda?/dataext3defaults1 2
11. Verify by mounting on current Sessions also:
mount /dev/hda? /data
Add a new logical partition having size 100MB and create the /data which will be the mount point for the new partition.
Answer and Explanation:
There are two different networks 192.168.0.0/24 and 192.168.1.0/24. Where 192.168.0.254 and 192.168.1.254 IP Address are assigned on Server. Verify your network settings by pinging 192.168.1.0/24 Network’s Host.
Answer and Explanation: At exam time read the Lab Scenario carefully. Actually there are two different networks one is 192.168.0.0/24 where your system resides know as example.com domain and another is 192.168.1.0/24 know as cracker.org domain.
One server named sever1.example.com having 192.168.0.254 and 192.168.1.254 is running in your exam. If you make a gateway to that server, you will can ping because IP forwarding is enabled on that server.
1.vi /etc/sysconfing/network
NETWORKING=yes
HOSTNAME=station?.example.com
GATEWAY=192.168.0.254
2.service network restart
Or
1.vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=X.X.X.X
NETMASK=X.X.X.X
GATEWAY=192.168.0.254
2.ifdown eth0
3.ifup eth0
Note: If gateway is specified in both file, default gateway takes from interface specific file.
Give Full Permission to owner user and owner group member but no permission to others on /data.
Answer and Explanation:
We can change the permission of file/directory either character symbol method or numeric method.
Permission:
r-Read
w-Write
x-Execute
Permission Category
u- Owner User
g- Owner Group
o- Others
Operators
+ Add the Permissions
- Remove the Permissions
= Assigns the Permissions
Numeric Method:
4Read
2 Write
1Execute
Total: 7, total for owner user, owner group member and for others : 777
or
chmod 770 /data
/data Directory is shared from the server1.example.com server. Mount the shared directory that:
Answer and Explanation:
/mnt/etc/auto.misc--timeout=50
When you mount the other filesystem, you should unmount the mounted filesystem, Automount feature of linux helps to mount at access time and after certain seconds, when user unaccess the mounted directory, automatically unmount the filesystem.
/etc/auto.master is the master configuration file for autofs service. When you start the service, it reads the mount point as defined in /etc/auto.master.
Add a cron schedule to take full backup of /home on every day at 5:30 pm to /dev/st0 device.
Answer and Explanation:
1.vi /var/schedule
30 17 * * * /sbin/dump -0u /dev/st0 /dev/hda7
2.crontab /var/schedule
3.service crond restart
We can add the cron schedule either by specifying the scripts path on /etc/crontab file or by creating on text file on crontab pattern.
cron helps to schedule on recurring events. Pattern of cron is:
MinuteHourDay of MonthMonth Day of WeekCommands
0-590-231-311-120-7 where 0 and 7 means Sunday.
Note * means every. To execute the command on every two minutes */2.
Raw (Model) printer named printer1 is installed and shared on 192.168.0.254. You should install the shared printer on your PC to connect shared printer using IPP Protocols.
Answer and Explanation:
IPP( Internet Printing Protocol), allows administrator to manage printer through browser so CUPS is called Internet Printing Protocol based on HTTP. We can Install the printer either through: system-confing-printer tool or through Browser.
1.Open the browser and Type on address: http://localhost:631 CUPS (Common Unix Printing System) used the IPP protocol. CUPS use the 631 port.
2.Click on Manage Printer.
3.Click on Add Printer.
4.Type Printer name, Location, Description.
5.Select Device for bb. (Select IPP).
6.Device URL: ipp://192.168.0.254/ipp/ queue name Same printer name of shared printer.
7.Select Model/Driver RAW printer.
8.service cups restart
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.
Answer and Explanation:
1. use the authconfig or system-config-authentication
2. Select the [*] USE NIS
3. Type the NIS Domain: RHCE
4. Type Server 192.168.0.254 then click on next and ok
5. You will get a ok message.
6. Create a Directory /rhome/stationx where x is your station number.
6. vi /etc/auto.master and write at the end of file
/rhome/stationx /etc/auto.home --timeout=60
7. 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.
8. Service autofs restart
9. 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 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.
Deny to all users except root to run cron schedule.
Answer and Explanation:
1.vi /etc/cron.allow
root
or
vi /etc/cron.deny
Write all user name to deny.
/etc/cron.allow, /etc/cron.deny file is used to control users to allow or deny. If /etc/cron.allow file is created only that users are allowed to run cron schedule. Another way to deny to users is /etc/cron.deny write all user name on single line.
There is a FTP server 192.168.0.254 and all required packages are dumped in /var/ftp/pub of that server and anonymous login is enabled. Install the Redhat Enterprise Linux 5 as an anonymous by creating following partitions:
/1000
/boot200
/home1000
/var1000
/usr4000
swap2X256 (RAM SIZE)
Answer and Explanation:
Note: Examiner will provide you the Installation startup CD. And here mentioned size may vary see on the exam paper.
1.Insert the CD on CD-ROM and start the system.
2.In Boot: Prompt type linux askmethod
3. It will display the Language, keyboard selection.
4. It will ask you for the installation method.
5. Select the FTP from the list
6. It will ask the IP Address, Net mask, Gateway and Name Server. Select Use
Dynamic IP Configuration: because DHCP Server will be configured in your exam lab.
7. It will ask for the FTP site name and Redhat Enterprise Linux Directory.
Specify the FTP Server: 192.168.0.254
Directory: pub Because anonymous login on /var/ftp.
8. After Connecting to the FTP Server Installation will start. Go up to the partition screen by selecting the different Options.
9. Create the partition According to the Question because Size and what-what partition should you create at installation time is specified in your question
10. Then select the MBR Options, time zone and go upto package selections.
It is another Most Important Time of installation. Due to the time limit, you should be
care about the installation packages. At Exam time you these packages are enough.
X-Window System
GNOME Desktop
(these two packages are generally not required)
Administration Tools.
System Tools
Windows File Server
FTP Servers
Mail Servers
Web Servers
Network Servers
Editors
Text Based Internet
Server Configuration Tools
Printing Supports
When installation will complete, your system will reboot. Jump for another Question.
Make user1, user2 and user3 belongs to training group.
Answer and Explanation:
There are two types of group, I) primary group II) Secondary or supplementary group.
Here user1, user2 and user3 belong as supplementary to training group. So these users get the permission of group member.
Create the user named jackie, curtin, david
Answer and Explanation:
1.useradd jackie
2.useradd curtin
3. useradd david
useradd command is used to create the user. All user’s information stores in /etc/passwd and user;s shadow password stores in /etc/shadow.
Make Secondary belongs the jeff and marion users on sysusers group. But harold user should not belongs to sysusers group.
Answer and Explanation:
1.usermod -G sysusers jeff
2.usermod –G sysuser marion
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.