updated notes
This commit is contained in:
@@ -583,3 +583,22 @@ pool 2.rhel.pool.ntp.org iburst # Add the RHEL time server
|
||||
sudo systemctl start chronyd # Start the chrony service
|
||||
sudo systemctl enable chronyd # Enable the chrony service to start on boot
|
||||
```
|
||||
|
||||
## Secure Linux Systems
|
||||
|
||||
### lsattr
|
||||
```bash
|
||||
lsattr # List the attributes of the files and directories
|
||||
|
||||
lsattr /etc/passwd # List the attributes of the /etc/passwd file
|
||||
```
|
||||
|
||||
### chattr
|
||||
```bash
|
||||
chattr +i /etc/passwd # Set the immutable attribute on the /etc/passwd file
|
||||
chattr -R +i /etc/ # Set the immutable attribute on the /etc/ directory and all its contents
|
||||
chattr +a /etc/passwd # Set the append only attribute on the /etc/passwd file
|
||||
|
||||
chattr -i /etc/passwd # Remove the immutable attribute on the /etc/passwd file
|
||||
chattr -R -i /etc/ # Remove the immutable attribute on the /etc/ directory and all its contents
|
||||
```
|
||||
Reference in New Issue
Block a user