Weekend Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: xmas50

RedHat RH202 - RHCT (Redhat Certified Technician) RH202

Page: 2 / 5
Total 140 questions

Create the directory /archive and group owner should be the sysuser group.

Answer and Explanation:

1.chgrp sysuser /archive

2.Verify using ls -ld /archive command. You should get like

drwxr-x--- 2 root sysadmin 4096 Mar 16 17:59 /archive

chgrp command is used to change the group ownership of particular files or directory.

Another way you can use the chown command.

chown root:sysuser /archive

You are working as a System Administrator at Certpaper. Your Linux Server crashed and you lost every data. But you had taken the full backup of user’s home directory and other System Files on /dev/st0, how will you restore from that device?

Answer and Explanation:

1. Go to on that directory where you want to restore.

2. restore –rf /dev/st0

To restore from backup we use the restore command. Here backup will restore from /dev/st0 on current Directory.

One Package named zsh is dump on ftp://server1.example.com under pub directory. Install the package from ftp server.

Answer and Explanation:

1.rpm –ivh ftp://server1.example.com/pub/zsh-*

2.Package will install

rpm command is used to install, update and remove the package, -i means install, -v means verbose and -h means display the hash mark.

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.

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.

The System you are using is for NFS (Network File Services). Some important data are shared from your system. Make automatically start the nfs and portmap services at boot time.

Answer and Explanation:

We can control the services for current session and for next boot time also. For current Session, we use service servicename start or restart or stop or status. For automatically on next reboot time:

    chkconfig servicename on or off

eg: chkconfig nfs on

chkconfig portmap on

or

ntsysv

Select the nfs and portmap services.

    Reboot the system and identify whether services are running or not.

One Package named zsh is dump on ftp://server1.example.com under /pub/updates directory and your FTP server is 192.168.0.254. Install the package zsh.

Answer and Explanation:

1.rpm –ivh ftp://server1/example.com/pub/updates/zsh-*

or

1.Login to ftp server : ftp ftp://server1.example.com using anonymous user.

2.Change the directory: cd pub and cd updates

3.Download the package: mget zsh-*

4.Quit from the ftp prompt : bye

5.Install the package

6.rpm -ivh zsh-*

7.Verify either package is installed or not : rpm -q zsh

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:

          Use netconfig command

          Enter the IP Address as given station number by your examiner: example: 172.24.0.1

          Enter Subnet Mask

          Enter Default Gateway and primary name server

          press on ok

          ifdown eth0

          ifup eth0

          verify using ifconfig

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.

neo user tried by:

dd if=/dev/zero of=/home/neo/somefile bs=1024 count=70

files created successfully. Again neo tried to create file having 70K using following command:

dd if=/dev/zero of=/home/neo/somefile bs=1024 count=70

But he is unable to create the file. Make the user can create the file less then 70K.

Answer and Explanation:

Very Tricky question from redhat. Actually question is giving scenario to you to implement quota to neo user. You should apply the quota to neo user on /home that neo user shouldn’t occupied space more than 70K.

1.vi /etc/fstab

2.touch /home/aquota.userCreating blank quota database file.

3.mount -o remount /home  Remounting the /home with updated mount options. You can verify that /home is mounted with usrquota options or not using mount command.

4.quotacheck -u /home  Initialization the quota on /home

5.edquota –u neo /home  Quota Policy editor

See the snapshot

1 Disk quotas for user neo (uid 500):

2 Filesystem blocks soft hard inodes soft hard

4 /dev/mapper/vo-myvol 2 30 70 1 0 0

Can you set the hard limit 70 and soft limit as you think like 30.

Create the partition having 100MB size and mount it on /mnt/neo

Answer and Explanation:

    Use fdisk /dev/hdaTo create new partition.

    Type nFor New partitions

    It will ask for Logical or Primary Partitions. Press l for logical.

    It will ask for the Starting Cylinder: Use the Default by pressing Enter Key.

    Type the Size: +100MYou can Specify either Last cylinder of Size here.

    Press P to verify the partitions lists and remember the partitions name.

    Press w to write on partitions table.

    Either Reboot or use partprobe command.

    Use mkfs –t ext3 /dev/hda? Where ? is your partition number

    Or

    mke2fs –j /dev/hda? To create ext3 filesystem.

    mkdir /mnt/neo

    vi /etc/fstab

    Write:

    /dev/hda?/mnt/neoext3defaults1 2

    Verify by mounting on current Sessions also:

    mount /dev/hda? /mnt/neo