Merge pull request #779 from slash3b/slash3b
visudo and getent were added
This commit is contained in:
11
pages/common/visudo.md
Normal file
11
pages/common/visudo.md
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# visudo
|
||||||
|
|
||||||
|
> Safely edit the sudoers file.
|
||||||
|
|
||||||
|
- Edit sudoers file:
|
||||||
|
|
||||||
|
`sudo visudo`
|
||||||
|
|
||||||
|
- Check sudoers file for errors:
|
||||||
|
|
||||||
|
`sudo visudo -c`
|
23
pages/linux/getent.md
Normal file
23
pages/linux/getent.md
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
# getent
|
||||||
|
|
||||||
|
> Get entries from Name Service Switch libraries.
|
||||||
|
|
||||||
|
- Get list of all groups:
|
||||||
|
|
||||||
|
`getent group`
|
||||||
|
|
||||||
|
- See the members of a group:
|
||||||
|
|
||||||
|
`getenet group {{group_name}}`
|
||||||
|
|
||||||
|
- Get list of all services:
|
||||||
|
|
||||||
|
`getent services`
|
||||||
|
|
||||||
|
- Find a username by UID:
|
||||||
|
|
||||||
|
`getent passwd 1000`
|
||||||
|
|
||||||
|
- Perform a reverse DNS lookup:
|
||||||
|
|
||||||
|
`getent hosts {{host}}`
|
Reference in New Issue
Block a user