"Linux System Basics" class essay 3 7.20

Source: Internet
Author: User

esc+. (period): Quickly write a path that has been written last

Several commands that the command line looks at:

Cat :

TAC: ( write-down of cat)

MORE: pagination Displays text file one-way "common with pipe breaks"

Less: Pagination display text file can turn the page q key to exit

Head: Quick view of top ten lines (system default)

Tail : Quick View after ten lines (system default)

Example: [[email protected] ~]# CAT/ETC/PASSD

[Email protected] ~]# more "esc+. "/ETC/PASSD

Chapter One user and group account management

11.1 Users

Linux systems are divided into three categories of users. the root user, the system user, the ordinary user, respectively. The user's role recognition is achieved through the UID(user ID).

Root user : the UID is 0and the permissions are the highest. It's also called a super User .

System User: (Virtual user) UID 1-499 does not have the ability to log in to the Linux System, only provides the need for background services

Normal User: with login Linux functions, can operate its own contents of the directory. UID is 500-60000

User's basic information in ETC/PASSWD , encrypted password in shadow ,

Example:-rw-r--r--

rw-: Owner's permission "R: Read w write"

r--: Permissions for user groups

r--: Permissions for Everyone (that is, public)

Example 2: Encrypting a saved password

[Email protected] ~]# Ll/etc/shadow

----------. 1 root root 987 7 months 12:06/etc/shadow

Example: Meaning of user account information

Root:x: 0:0: root:/root:/bin/bash

[ login name ] [password ][uid][gid][ user name ] [ home directory ] [ Login Shell]

Example:adm: *: 15,695:0: 99,999:7:::

11.2 Manage user account settings under user account / character Interface

11.2.1.

Example: Adding a new User (and attaching properties)

[Email protected] ~]# Useradd user001

[Email protected] ~]# tail-3/etc/passwd

Luo:x:501:501::/home/luo:/bin/bash

Abc:x:502:502::/home/abc:/bin/bash

User001:x:503:503::/home/user001:/bin/bash

Example 2: Modifying a new user password [ password ; Qwert]

[Email protected] ~]# passwd user001

change The password for the user user001.

the new Password:

re-enter the new Password:

passwd: All the authentication tokens have been successfully updated.

Passwd-u 1450 Custom UID value

Example : Create a new user Moonand Customize the UID to 510

[Email protected] ~]# Useradd-u 510 Moon

[Email protected] ~]# CAT/ETC/PASSWD | grep Moon

Moon:x:510:510::/home/moon:/bin/bash

Example: Home directory

[Email protected] ~]# useradd-d/home/www Noon

[Email protected] ~]# CAT/ETC/PASSWD | grep Noon

Noon:x:511:511::/home/www:/bin/bash

[Email protected] ~]# ls-l/Home

Total Dosage 40

DRWX------. 4 ABC abc 4096 7 month 12:06 ABC

DRWX------. 2 root root 16384 7 months 11:25 Lost+found

DRWX------. 4 Luo luo 4096 7 months 01:13 Luo

DRWX------. 4 Moon Moon 4096 7 months 15:45 Moon

DRWX------. 4 Uer1 uer1 4096 7 months 18:31 uer1

DRWX------. 4 user001 user001 4096 7 months 14:47 user001

DRWX------. 4 Noon Noon 4096 7 months 15:52 www

example ; User Groups

[Email protected] ~]# useradd-g root pp

[Email protected] ~]# CAT/ETC/PASSWD | grep pp

Pp:x:512:0::/home/pp:/bin/bash

Example: View the value of PP, the meaning of each representative

[[email protected] ~]# ID pp

UID=512 (PP) gid=0 (root) group =0 (Root)

Example:shell type

[Email protected] ~]# Useradd-s/bin/ksh CCC

[Email protected] ~]# CAT/ETC/PASSWD | grep CCC

Ccc:x:513:513::/home/ccc:/bin/ksh

112.2 Modify information for existing users

11.2.3

11.3 Group Account

Introduction :

11.4 managing group accounts

11.6 Account Maintenance

11.7 account Information Display

               

permissions, owners, and ACLs

12.1 Setting file and directory permissions

Example:-rw-r--r---rw-r--r--rwS r--r---rw-r-s R---rw-r--r-t

420 s S T

6 4 4 4 2 1 4600 2600 1600

rw-: User owner's permission "R: Read w write"

r--: Permissions for group owners

r--: Permissions for the remaining other users (that is, public)

R:4 w:2 x:1-:0

12.2 file Browser settings permissions

set permissions by 12.3 text setting

Example: More information about the/root/test.log file

Add user owner execution permissions to the/root/test.log file

Remove user owner 's execute permissions to the/root/test.log file

[Email protected] dir01]# LL/USR/BIN/PASSWD

-rwsr-xr-x. 1 root root 30768 2 months 2012/usr/bin/passwd

" S: can temporarily elevate the current user's privileges to root"

-rw-r-sr-x.

-rw-r-xr-t.

"Linux System Basics" class essay 3 7.20

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.