Solaris User Management

Source: Internet
Author: User
Tags chmod touch

(i) Basic user knowledge

1. File information

Ls-l

drwxrwxrwx filename

(1) Access rights

mode:rwx rwx rwx r:read w:write x:execute

User group Other

Abbreviation: (u) (g) (O)

(2) file type

: Normal file

B: Block special files, such as hard disk and CDROM equipment

C: Character file devices

L: Symbolic Connection

P: Pipe or stream, for process communication

D: Table of Contents

2. Default Permissions

When creating files and directories, the system automatically sets certain permissions. Default permissions are controlled by user mask code

$umask? Show user Umask Code

Umask Settings File directory

022 new documents are subject to the right to read and modify the user group and other users have the right to read and modify

User groups and other users only read right

Use umask maskvalue to change default permissions

3. System security Files

(1)/etc/passwd

(2)/etc/shadow

/etc/group

/etc/default/login

(ii) Related orders

1. chmod change the attributes of a document or directory

Command format: chmod [-r] Mode name

(name can be a filename or directory name; mode can be a 3 8-bit number, or use the ls-l command to list

The text abbreviation for the read, write, and execute permission of a document or directory.

Example:

%chmod 755 Dir1 The directory Dir1, set to any user, has the right to read and execute,

But only the owner can make changes.

%chmod file1

File1 the document, setting only the owner can read, write, and execute.

%chmod o+x File2

File2 the document to increase the rights that the owner can execute.

%chmod g+x File3

File3 the document to increase the rights that the group user can execute.

%chmod O-r File4

File4 the document to remove the rights that other users can read.

2. Chown change the ownership of a document or directory

Command format: chown [-r] Username name (name can be file name or directory name.)

Example:

%chown user File1 To change the ownership of the document FILE1 to user user.

%chown-r user Dir1 The directory Dir1, and the ownership of all the documents and subdirectories under it,

Change to user user all.

3. CHGRP Change the group ownership of a document or directory

Command format: CHGRP [-R] GroupName name (name can be file name or directory name)

Example:

%chgrp VLSI File1

Change the group ownership of the document FILE1 to the VLSI group.

%chgrp-r Image Dir1

Change the directory Dir1 to the image group, with all of its documents and subdirectories.

4. Touch changes the time of the document or directory

Command format: Touch name (name can be document or directory name.)

5.who View System Registered user

6. ID view current user number and group number

7. passwd Modify User Password

Command format: passwd username

No user parameters modify this user password

8. su Convert user

Command format: su [-] username

No user parameters for conversion to Superuser

-: Performing new user environment settings

(iii) Shell features

1. Solaris three-class shell

Bourne (default shell)

C

Korn

Shell Basic Features

Characteristics

Bourne

C

Korn

Alias mechanism

No

Yes

Yes

Enhanced CD (Cdpath) features

Yes

Yes

Yes

History list

No

Yes

Yes

Job Control

No

Yes

Yes

Prevent files from being overwritten

No

Yes

Yes

Ignore Control_d

No

Yes

Yes

2. Shell B

Variable settings

Example: Terminal type: Term=vt100;export TERM

Language environment: Lang=c;export LANG

Path= $PATH:/usr/bin; Export PATH

(2) Environmental documents

. Profile

3. C Shell

Variable settings

Example: Terminal type: setenv term=vt100

Path variable: Set path= ($path/usr/bin)

(2) Environmental documents

. Login. CSHRC

(iv) Create, delete user accounts

Admintool

Useradd

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.