Red Hat RHCSA and RHCE certification exercise and operation steps

Source: Internet
Author: User
The level is limited and the problem is in a hurry. Please forgive me for any mistakes or omissions. In addition to CHSCA: 1. Change the password at startup Esce [in 1 mode] enterb [boot] setenforce0 {Change Password in tolerant mode} passwdreboot2.serviceNetworkManagerstop; chkconfigNetworkManageroff

The level is limited and the problem is in a hurry. Please forgive me for any mistakes or omissions.

CHSCA

Question:

1. Change the password at startup

Esc

E

[Enter 1 mode] enter

B [boot]

Setenforce 0 {Change Password in tolerant mode}

Passwd

Reboot

2. service NetworkManager stop; chkconfig NetworkManager off

3. service iptables stop; chkconfig iptables off

 

# Network settings

Hostname: station.domainX0.example.com

IP: 192.168.0.X

NETMASK: 255.255.255.0

GATEWAY: 192.168.0.254

 

1 'vim/etc/sysconfig/network

2 'vim/etc/sysconfig/network-scripts/ifcfg-eth0

3 'vim/etc/resolv. conf [DNS]

4 'vim/etc/hosts

# Configure yum Source

Specify to ftp: // 192.168.0.254/pub/rhel6/dvd/Server

1 'CD/etc/yum. repos. d/if there are other, mv dvd. repo gls. repo ../

2 'vim exam. repo [edit yum source]

[Server]

Name = Server

Baseurl = ftp: // 192.168.0.254/pub/rhel6/dvd/Server

Enable = 1

Gpgcheck = 0

3 'yum list {yum clean all clear cache}

# Lvm resizing

Will "/home lv" extend to 300 M (no more than 30 M error)

 

1 'lvdisplay

2 'lvextend-L 300 M/dev/vol0/home [target path to be resized]

3 'resize2fs/dev/vol0/home

4 'lvdisplay

# Lvm reduce to 200 M

1 'lvdisplay

2 'umount/home

3 'fsck-f/dev/vol0/home

4 'resize2fs/dev/vol0/home 200 M

5 'lvreduce-L 200 M/home/vol0/home

6 'mount/home

# Group Management

Add a group named "admin"

 

1 'groupadd-g 2000 admin

2 'grep admin/etc/group

 

# User management

Add user "tom", ask its home directory is/home/tommy

Add user "mike", ask its uid is 800, its affiliated groups is "admin"

Add user "selina", can't land shell

Passwd: RedHat

1 'useradd-d/home/tommy tom

2 'useradd-u 800-G admin mike usermod-aG admin add new group

3 'useradd-s/sbin/nologin selina

4' for UNAME in tom mike

> Do

> Echo "redhat" | passwd -- stdin $ UNAME

> Done

 

# File Permission

Copy file/etc/passwd to/var/tmp

Owners is root, group: admin, the members of admin can write in it

Others without any access

 

1 'cp/etc/passwd/var/tmp

2 'chgrp admin passwd & chown root: admin passwd

3 'chmod 660 passwd

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.