Seventh Day RHEL6.5 install VMware Tools, RHEL6.5 and RHEL7.2 root password cracking, Linux user management (first draft)

Source: Internet
Author: User

1. RHEL6.5 Install VMware Tools,

Open RHEL6.5 Virtual machine

Click on the menu bar under the virtual machine option to have an install vmware-tools (because I have already installed it, so it is reinstalled)

This is the system automatically mounts the optical drive and mounts the Vmware-tools CD

Open terminal for convenience, Mount to/mnt after uninstalling the optical drive

Umount/dev/cdrom

Mount/dev/cdrom/mnt

In the/mnt directory, there is a Vmware-tools toolkit

Copy it to the ~ directory

CP vmware-~

unzip the copy of the package

Note: Compressed packages are available in two formats: Bz,gz

BZ decompression command: Tar jxvf [file name]

GZ decompression command: Tar zxvf [file name]

There are other decompression commands, their own Baidu bar man can also

After extracting, a folder is generated

CD Vmware-tools-distrib

./vmware-install.pl #开始安装

The rest of the way the default return.

The installation is successful here!!!

2, RHEL6.5 and RHEL7.2 root password hack

2.1 RHEL7.2 root password hack

First, you need to turn off SELinux and run in the terminal when you are powered on

Getenforce #查看selinux状态

If not set to power on automatically shutdown execute command

Vim/etc/sysconfig/selinux

Selinux=disable

Methods See: Http://www.cnblogs.com/xiaogan/p/5722160.html profile/etc/sysconfig/selinux

Then, reboot, use the UP and down cursor keys to lock the boot interface in:

Select the first line and enter E for editing

Find ro (ro = Read only; rw = Read Write)

Modify RO to RW init=/sysroot/bin/sh

Then, use CTRL + X to start the computer

This is going to go into rescue mode,

In this mode, the first step we need to do is to change the root chroot (why change root?). )

Execute command:

Chroot/sysroot

Then passwd

After entering the password two times, exit

Using commands

/bin/sh Shutdown-r Now

Restart

So, the root password has been modified by us.

2.2 RHEL6.5 root password hack

The first step: Restart the computer, to the following interface

The second step: Enter E for editing, move the cursor to the second line, enter E for editing, enter a space in the last position 1, so that you can enter the single-user mode,

Step three: note, do not enter ESC, but return, ESC is canceled modification, enter is OK, input carriage

Then, enter B to start, which is going to enter the following interface:

Fourth step: Enter passwd directly, enter both sides of the password, restart,

ok! to this, RHEL6.5 root password hack is done!!! Isn't it simple?

3. Linux User Management

This part will say tomorrow, sleep first!!! (Put the notes on first)

Super User: Root Supreme
System permissions are highest in Windows and cannot be logged on

Local Users:
System User: Program user, maintenance program, cannot log in

Classification:
Depending on location: local remote
Based on function: Superuser (root) uid:0
System User uid:1-999
Local User uid:1000+
RHEL6, a researcher

Add a normal user to view its UID
Useradd AAA
ID AAA
Useradd-s/sbin/nologin Nginx
ID Nginx

About the user's configuration file:
Account Information Password information
Users:/etc/passwd/etc/shadow
Group:/etc/group/etc/gshadow

Add user
Useradd Lisi
Tail-1/etc/passwd
Tail-1/etc/shadow
passwd Lisi
Tail-1/etc/shadow
Useradd parameter default host directory/home
-U UID
-D Host Directory
-G Start Group #只能有一个
-G Additional Group #可以有多个
-S Login Shell

What does each field in a row in/etc/passwd represent?
? How to highlight passwd
User name: Password placeholder: uid:gid: User description: Owner's directory (~): Shell used after login

Pseudo user
Useradd-s/sbin/nologin-m MySQL
-M does not create a host directory

Specify User UID
Useradd-u SWK
Specify the host directory
Specify starting Group
Specify additional groups
Specify login Shell
Chsh-l

Useradd or AddUser or add directly to/etc/passwd


Userdel [Delete User]
Userdel-r [Delete User] together with the host directory to delete

Password
/etc/shadow

echo 123456 | passwd--stdin Zhaosi

USERMOD user Name parameter with/useradd

echo ' Command ' >>/etc/passwd
Can you do that?

Groupadd adding groups

vim/etc/passwd
Vim/etc/shadow

SSH [email protected] #不能ssh no password

Group Category:
By location:
by function:
Vim/etc/group
Group name: Password placeholder: GID: Group member

Groupdel AA


Switch
Su


Vim/etc/default/useradd

Cd/etc/skel #模版
Ls-a

cp/etc/skel/.bash*/home/nas
Chown nas:nas/home/nas/.bash*


View user Information
Id
W #登录信息
Who #
WhoAmI
Who am I
Fingle

Rpm-q Finger
rpm-ivh/mnt/packages/
Yum-y Install finger


Finger gan
Finger
Mans finger
Finger--help

Seventh Day RHEL6.5 install VMware Tools, RHEL6.5 and RHEL7.2 root password cracking, Linux user management (first draft)

Related Article

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.