User account and / etc / passwd
Format ①rootroot: ②x: ③0: ④0: ⑤root: ⑥ / root: ⑦ / bin / bash ① User name: A unique account name in the system. (2) Password: Encrypted password. Currently, "x" is entered as a shadow password. The shadow password is stored in etc / shadow and can only be read by the root user. ③UID… Unique ID for identifying the user.root is 0, 1 to 99 are for system management, and others are 1000 or later. ④ GID… Unique ID to identify the group. ⑤ GECOS… Comment. ⑥ Home directory… Absolute path of the user's home directory. ⑦ Default shell… The absolute path of the shell that is started when the user logs in or opens a new shell.
Group accounts and etc / group
Format ①root: ②x: ③0: ④ ① Group name (2) Group password: Password for group members. Currently, "x" is entered as a shadow password. ③ GID… Unique ID to identify the group. ④ Group member… Enter the user name of the user who makes this group a subgroup.
Manage users and groups using commands
・ Creating a user account Syntax: *** useradd [optional] {username} ***
・ Change existing user account Syntax: *** usermod [optional] {username} ***
・ Delete user account Syntax: *** userdel [optional] {username} ***
·change Password Syntax: *** passwd [optional] {username} ***
・ Creating a group Syntax: *** groupadd {group name} ***
・ Change existing group information Syntax: *** groupmod [optional] {username} ***
・ Delete group Syntax: *** groupdel {group name} ***
・ Confirmation of the group to which you belong Syntax: *** id {username} ***
Cron consists of crond and crontab. The daemon looks at the crontab file every minute and runs jobs if there is a schedule to run. Editing crontab is not an editor, but *** crontab -e Use the *** command.
Format #m h dom mon dow command
Example) 00 00 * * 1 / usr / local / bin / backup ⇒ Execute the backup file every Monday at 0:00
at command
Book a one-time run. Syntax *** at [option] ***
Access control of cron and at
List the users who allow cron access in /etc/cron.allow and the users who deny it in /etc/cron.deny. Similarly, the users who allow at access in /etc/at.allow, List the rejected users in /etc/at.deny.
Scheduling with systemd
By using the timer unit, there are a monotonic timer that executes periodically after a certain period of time from some event and a real-time timer that executes periodically by specifying a calendar.
Syntax *** locale [option] *** Check the current locale setting.