setup/doc/grp-usr.md

28 lines
517 B
Markdown
Raw Permalink Normal View History

# Create Group And User
2022-02-15 15:23:52 +01:00
* make sure group or user to be created does not exist yet
```
id <group or user name>
```
* create system group
```
sudo groupadd -r <group name>
```
* create system user with specific login shell and group
```
sudo useradd -r -s /bin/false -g <group name> <user name>
```
* print real and group and user id
```
id <group or user name>
```
2022-02-12 20:41:38 +01:00
* extract group and user details from OS configuration for verification
```
cat /etc/group|grep <group name>
cat /etc/passwd|grep <group name>
```