Useful Commands Linux

List all users with UID >= 1000

awk -F: '($3 >= 1000) {printf "%s:%s\n",$1,$3}' /etc/passwd

Add User:

#adduser ranto

Add user to Sudo Group

#usermod -aG sudo ranto

Verify user can use sudo:

#su – ranto
ranto$ sudo ls -la /root