Linux Users

List users

$ cat /etc/passwd | grep "/home"
Beena:x:500:500:Beena Emerson:/home/Beena:/bin/bash

Only list names:
$ cat /etc/passwd |grep /bin/bash |grep [5-9][0-9][0-9] |cut -d: -f1
Beena

Add New User

You have to be root user to be able to add new users.
# useradd test_user
# cat /etc/passwd |grep /bin/bash |grep [5-9][0-9][0-9] |cut -d: -f1
Beena
test_user
Switch Users:
# su test_user
[test_user@localhost ~]$

Add Password

# passwd test_user
Changing password for user test_user.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

Delete User

# userdel test_user
# cat /etc/passwd |grep /bin/bash |grep [5-9][0-9][0-9] |cut -d: -f1
Beena

1 comment:

  1. Casino Review and Bonus Codes | JTGHub
    New players 김제 출장마사지 who join JTGHub can claim up to $1000 on their first 울산광역 출장마사지 deposit 청주 출장안마 and use the bonus code CASINORF 하남 출장마사지 on their first deposit. 대구광역 출장안마

    ReplyDelete