) All users in all the wheel groups in the system can use sudo.
% Wheel all = (all) nopasswd: all users in the wheel group do not use the nopasswd password.
User_alias admpw = vbird, dmtsai, vbird1, and vbird3 are added to the admpw group.
Admpw all = nopasswd :! /Usr/bin/passwd,/usr/bin/passwd [A-Za-Z] *, \
! /Usr/bin/passwd root can change the user password, but cannot change the root password (add it before the command! Cannot represent)
Pam (Pluggable Authentication Modules, Embedded Module)
= nopasswd :! /Usr/bin/passwd,/usr/bin/passwd [A-Za-Z] *,/
! /Usr/bin/passwd root can change the user password, but cannot change the root password (add it before the command! Cannot represent)
Pam (Pluggable Authentication Modules, embedded Mode)
Who W view who is online
Last recent host login information
Lastlog recent logon time read/var/log/lastlog
Talk with other users
Write sending information write
separately.Daily indicates that the dump cycle is daily.Weekly indicates that the dump cycle is weekly.Monthly specifies the dump cycle as per monthRotate count indicates the number of dump times before the log file is deleted. 0 indicates no backup, and 5 indicates five backups are retained.Tabootext [+] list to prevent logrotate from dumping files with the specified extension. The default extension is. rpm-orig,. rpmsave, V, and ~Size size: dump a log file only when it reaches the specified s
Analysis of linux logs and linux logs
In linux, the connection time logs are generally recorded by the/var/log/wtmp and/var/run/utmp files. However, these two files cannot be directly viewed by cat, the file is automatically updated by the system. You can view the file by using the w, who, finger, id, last, lastlog, and ac commands.
For process monitoring logs in linux, process monitoring logs are effective in monitoring user operation commands, you c
corresponding purposes, so that you can locate the problem more quickly and solve various faults in a timely manner. For example:
>/Var/log/messages: records Linux kernel messages and common logs of various applications, including startup, IO errors, network errors, and program faults. For applications or services that do not use an independent log file, you can obtain relevant event records from the file.> /Var/log/cron: records the event messages generated by crond scheduled tasks.> /Varlog/d
for signs of a rootkit. ItContains* chkrootkit:a shell script, checks system binaries forRootkit modification.* Ifpromisc.c:checks If the network interface is in promiscuousMode.* Chklastlog.c:checks for Lastlog deletions.* Chkwtmp.c:checks for wtmp deletions.* Check_wtmpx.c:checks for wtmpx deletions. (Solaris only)* Chkproc.c:checks for signs of LKM Trojans.* Chkdirs.c:checks for signs of LKM Trojans.* Strings.c:quick and dirty strings replacement.
The role of logsUsed to record various events that occurred during the operation of the system and programRead logs to help diagnose and resolve system failuresClassification of log filesKernel and system logsManaged by the system service Rsyslog Unified, the log format basically similarUser logRecord System user login and exit related system informationProgram LogLog files that are managed independently by various applications and are not uniform in record formatFormat of rsyslog.conf fileServi
1 mdash; understand the system status # uname amp; ndash; a: displays the complete information of the system. Uname: displays the system information. Hostname: displays the host name. Last: lists the most recent user logon. Lastlog: lists the recent user logon. Free: displays the memory usage. umstart is also displayed... 1-understand the status of the system # uname-a displays the complete information of the system Uname displays the system informa
Common logon files:/var/log/cron: records the running status of crontab and whether/etc/crontab is correct. /Var/log/dmesg: records the information generated during the core detection process when the system is started. /Var/log/lastlog: record the last time all accounts in the system log on to the system...
Common logon files:/Var/log/cron: records crontab running status and/etc/crontab./Var/log/dmesg: records the information generated during the cor
1. the connection time log of the connection time is generally recorded by the/var/log/wtmp and/var/run/utmp files, however, neither of these files can be directly viewed using the tail or cat command. The file is automatically updated by the system. Linux provides logs such as w, who, finger, id, last, l... 1. connection time
The connection time log is generally recorded by the/var/log/wtmp and/var/run/utmp files. However, neither of these files can be directly viewed using the tail or cat com
packages drop log rotation information into this directory
Include/etc/logrotate. d
# No packages own lastlog or wtmp-we "ll rotate them here
/Var/log/wtmp {
Monthly
Create 0664 root utmp
Rotate 1
}
/Var/log/lastlog {
Monthly
Rotate 1
}
# System-specific logs may be configured here
The default configuration is generally placed at the beginning of the logrotate. conf file, affecting the entire system. I
1. Connection time logsThe connection time log is generally recorded by the/var/log/wtmp and/var/run/utmp files. However, neither of these files can be directly viewed using the tail or cat commands. The file is automatically updated by the system. Linux provides commands such as w, who, finger, id, last, lastlog, and ac to read the information.1Ggd543 @ ubuntu:/home/test $ w # shows which users have logged on to the system and what are currently bein
Connection time log-the connection time log is executed by multiple programs and records are written to/var/log/wtmp and/var/run/utmp. Login and other programs update the wtmp and utmp files so that the system administrator can track who is logged on to the system at any time.Log format-select the condition and priority.Error Log -- executed by syslogd (8. Various system Daemon Processes, user programs, and kernels report noteworthy events to files/var/log/messages through syslog (3. There are a
verification process. This is the opposite of requisits.# Optional: This module controls mostly display messages, not for verification purposes.##### Query users# W who# Last# Lastlog view the latest logon time of each vertex/var/log/lastlog##### User Discussion# Write user account [user's Terminal interface]# Mesg n refuse to accept information, but cannot reject root# Mesg y accept information# Wall "str
to the lastlog file.
-M: The logon directory is not automatically created.
-R: Create a system account.
-O,-non-unique allows users to have the same UID
-P,-password PASSWORD: Use the encrypted password for the new user
-S,-shell SHELL
-U,-uid UID specifies a UID for the new user
-Z,-selinux-user SEUSER use a specific SEUSER for the SELinux user mapping
[Root @ krlcgcms01 mytest] # useradd -- help
Usage: useradd [options] LOGIN
Options:
-B, -- base-
problem more quickly and solve various faults in a timely manner. For example:>/Var/log/messages: records Linux kernel messages and common logs of various applications, including startup, IO errors, network errors, and program faults. For applications or services that do not use an independent log file, you can obtain relevant event records from the file.> /Var/log/cron: records the event messages generated by crond scheduled tasks.> /Varlog/dmesg: records various event information during Linux
-contains the log at system startup.The/var/log/daemon.log-contains various system daemon log information./var/log/dpkg.log-includes the installation or DPKG command to clear the log of the package./var/log/kern.log-contains the logs generated by the kernel to help resolve problems when customizing the kernel./var/log/lastlog-records the most recent information for all users. This is not an ASCII file, so you need to use the
1 Server general Security Policy:1) It is best to use a hardware firewall, iptables input chain default policy is drop, open the necessary ports.2) password is absolutely safe, more than 24 people3) Take key login, prevent brute force hack, prohibit root login, normal user + key authentication +ip limit + user limit4) Periodic analysis of the system's log files, such as Last,lastlog,5) regularly use grep error/var/log/messages to check the server for
Common logsCommon logs are typically stored in/var/log.Common Log Viewing use: Ls/ll,cat/more/less view; Wtmp,lastlog use last and Lastlog to extract their informationConfiguration Log
Newer Ubuntu collects logs using the Rsyslog (Rocket-fast System for log) program
Rsyslog configuration file has two:/etc/rsyslog.conf (for configuring the logging Environment) and/etc/rsyslog.d/50-default.conf (for c
with the corresponding uses, so as to find the problem faster and solve various faults in time. Such as:
>/var/log/messages: Logs Linux kernel messages and common log information for various applications, including startup, IO errors, network errors, program failures, and so on. For applications or services that do not use stand-alone log files, it is generally possible to obtain related event logging information from the file.
>/var/log/cron: Logs event messages generated by Crond
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.