Unix: quick user overview
Calcolatori Elettronici e Sistemi Operativi
Name Resolution
Calcolatori Elettronici e Sistemi Operativi
Users and Groups
Users information are in /etc/passwd Groups information are in /etc/group
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 user:x:5084:4214:regular user:/home/user:/bin/bash
username userID groupID description user home directory user shell encrypted password ('x' indicates that it is in /etc/shadow)
root:x:0: daemon:x:1: usergroup1:x:4214: usergroup2:x:4215:user,user2
group name groupID list of users of the group encrypted group password ('x' indicates that it is in /etc/gshadow)
user with id=0: special user (for system administration) – has privileged rights on the system
Each user has a current group associated
change the current user group:
newgrp <group name>
if group is not one of the user's groups, the group password is required
Show information on user:
id [username]
example:
id uid=5084(user) gid=4214(usergroup1) groups=4214(usergroup1),4215(usergroup2) id root uid=0(root) gid=0(root) groups=0(root)