Comprehensive Guide to User and Group Management in Linux Systems: Covering Core Operations like Creation, Modification, and Permission Control

Comprehensive Guide to User and Group Management in Linux Systems: Covering Core Operations like Creation, Modification, and Permission Control

1. User Management 1. View User Information # View all users cat /etc/passwd # Basic user information getent passwd # Compatible with LDAP and other authentication methods # View currently logged-in users who # Simple view w # Detailed information (including activity) users # Show only usernames # View specific user information id username # … Read more

Basic Principles of Linux Permission Control

Basic Principles of Linux Permission Control

(Click the blue text above to quickly follow us) This article is recommended by the original author (Lü Kai) Below are examples of user and group information. The password information in /etc/shadow is stored encrypted and will not be exemplified. $cat /etc/passwd |head –n5 root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/bin/sh bin:x:2:2:bin:/bin:/bin/sh sys:x:3:3:sys:/dev:/bin/sh sync:x:4:65534:sync:/bin:/bin/sync $cat /etc/group |head –n5 root:x:0: daemon:x:1: … Read more