In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
1. Boot script (commands that need to be executed, the operation is written in and the boot is completed)
/ etc/rc.local (soft link file)
Lrwxrwxrwx. 1 root root 13 May 27 14:43 / etc/rc.local-> rc.d/rc.local (source file)
User classification id=0 root user
Id=1-999 system zombie user
Id=1000+ ordinary user
The user information file and password file are:
/ etc/passwd
/ etc/shadow
The group information file and the group password file are:
/ etc/group
/ etc/gshadow
Content details of user information file:
User name: password: uid:gid: description: home directory: log in to shell
Root:x:0:0:root:/root:/bin/bash
Bin:x:1:1:bin:/bin:/sbin/nologin
Daemon:x:2:2:daemon:/sbin:/sbin/nologin
Adm:x:3:4:adm:/var/adm:/sbin/nologin
Lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
Sync:x:5:0:sync:/sbin:/bin/sync
Shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
Halt:x:7:0:halt:/sbin:/sbin/halt
Mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
Operator:x:11:0:operator:/root:/sbin/nologin
Games:x:12:100:games:/usr/games:/sbin/nologin
Ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
Nobody:x:99:99:Nobody:/:/sbin/nologin
Systemd-network:x:192:192:systemd Network Management:/:/sbin/nologin
Dbus:x:81:81:System message bus:/:/sbin/nologin
Polkitd:x:999:998:User for polkitd:/:/sbin/nologin
Tss:x:59:59:Account used by the trousers package to sandbox the tcsd daemon:/dev/null:/sbin/nologin
Abrt:x:173:173::/etc/abrt:/sbin/nologin
Sshd:x:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
Postfix:x:89:89::/var/spool/postfix:/sbin/nologin
Chrony:x:998:996::/var/lib/chrony:/sbin/nologin
Tom:x:1000:1000:tom:/home/tom:/bin/bash
Jok:x:1001:1001::/home/jok:/bin/bash
Ntp:x:38:38::/etc/ntp:/sbin/nologin
Stu01:x:1002:1002::/home/stu01:/bin/bash
Alex999:x:888:1012::/home/alex999:/sbin/nologin
When this happens, there is a problem with the environment variable in the user's home directory. Just copy a copy of the environment variable to him (at this time, the system supports ordinary users to copy root users' files.
The directory is / etc/skel/.bash* these environment variables
2, create a user
Useradd user name
-u specifies the uid number
-s specifies login shell
-M does not create a home directory
-g specify the group to which the user belongs
Delete user
Userdel user name
-R recursively modify the permissions of directory files under the directory
Modify user
Usermod
-u specifies the uid number
-s specifies login shell
-G specifies the group to which the user belongs
Chown modifies the owner of a file or directory
-R recursively modify the permissions of directory files under the directory
Chown username directory / file name
Chgrp modifies the group to which a file or directory belongs
Chgrp group name directory / file name
Permission for chmod to modify a file or directory
Chmod ugo+x file name
Chmod 777 filename
Modify the password
Passwd user name
Echo '123456' | passwd-- stdin username is free to set password for each other
3, create a group
Groupadd group name
Delete a group
Groupdel group name
Modify and reorganize
Groupmod
-g reorganize id
4, expand:
Free-h View memory
Uptime View system load
Ps-aux to view system processes
Ps-ef to view system processes
Netstat views the current listening port
Top
Htop enhanced top
Iotop to view the iUnip O occupied by each process
Iftop to view system traffic
Dstat omni-directional system monitoring tool
Which user does last check and when? Which ip? When do I log in? When will you quit?
Lastlog to view the last login time of all system users
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.