Unix user management

xiaoxiao2021-03-06  78

(1) Basic knowledge of users 1. File information LS -L DRWXRWXRWX FileName (1) Access Mode: RWX RWX RWX R: Read W: Write X: Execute User Group Other Abbreviation: (U) (G) (O) (2 ) File type: ordinary file

B: Block special file, such as hard disk and CDROM device C: Character file device L: Symbol connection P: pipe or stream, used for process communication D: directory 2. Default permissions Create files and directories, system automatically sets certain permissions Default permissions control $ umask? Display UMASK Code UMASK Settings File Directory 022 The new file owner has read rights and modification user groups and other users have read rights and modification user groups and other users only Available Umask MaskValue to change the default permissions 3. System security file (1) / etc / passwd (2) / etc / shadow

/ etc / group

/ etc / default / login

(2) Related Commands 1. CHMOD Change Documents or Directory Properties Command Format: Chmod [-r] Mode Name (Name can be a file name or directory name; Mode can be 3 8-bit numerals, or LS -L Command, listing the document or directory, write, performing the text abbreviation of allowed rights.) An example:% chmod 755 DIR1 sets the directory DIR1, set to any user, all have the right to read and execute, but only the owner You can make a modification.% Chmod 700 file1 sets document file1, sets only owners to read, write, and execute.% Chmod o x file2 will file file file, increase the rights of the owner to execute.% Chmod g x file3 will document File3, increasing the right to execute group users.% chmod or file4 will document File4, remove other users to read right. 2. Chown change the owner of the document or directory: chown [-r] username name (Name can be a file name or directory name.) An example:% chown user file1 has the right of the document file1, change it to the user user.%.% Chown -r user dir1 converts the directory DIR1, and all the rights of all documents and subdirectories, and all the rights of the subdirectories.

3. ChGRP Change Document Original Command Format: Chgrp [-r] Groupname Name:% chgrp vlsi file1 has the right of document File1 group ownership, change to VLSI group .% chgrp -r image dir1 changes the directory DIR1, and all documents and subdirectories under the DIR1, and the subdirectories. 4. Touch change the document or directory last modification time command format: Touch Name (Name can be a document or directory name.) 5.Who View System Registration User 6. ID View the current user number and group number 7. Passwd Modify User Password Mandari : Passwd username No User Parameter Modification This User Password 8. SU Convert User Command Format: SU [-] User None User Parameters Transition to Super User -: Execute new user environment settings

(3) Shell Features 1. Solaris three types of Shell Bourne (default shell) c korn

Shell Basic Features

Features Bourne C Korn Almab Mechanism No Yes YES Enhanced CD (CDPATH) Function YES YES YES History List No Yes Yes YES Job Control No Yes YES YES Prevent File Overlay No Yes YES ignore Control_d No Yes YES2. B Shell

Variable Setting Upset: Terminal Type: Term = VT100; Export Term Language Environment: Lang = C; Export Lang Path = $ PATH: / USR / BIN; Export Path (2) Environment File .profile 3. C Shell

Variable Setup Example: Terminal Type: Stenv Term = VT100 Path Variable: SET PATH = ($ PATH / USR / BIN) (2) Environmental file .login .cshrc

(4) Creating, deleting user accounts

Admintool

转载请注明原文地址:https://www.9cbs.com/read-94243.html

New Post(0)