Tuesday, June 23, 2015

How to add user in Centos 6

Hello again, today i want to share about how to manage user in Centos 6 64Bit. User are an account that has created by user or by 3rd Party Application in order to run.

User can be created if you want to add another account to share your VPS, but remember, because you are in one VPS, so you much share your resource too  with another user that logon in your VPS.

You can limit user activity too for your user, example, if you want to limit your user only using SSH, or FTP, or VPN, it’s up to you. I recomend to limit your user, so it can be controlled, and your VPS not too overload, because some VPS Host will suspend VPS if there are unusual activity or high activity that makes VPS Overload.


1. How to add user in Centos 6
adduser angelimus
passwd angelimus

then type your password twice

2. How to add user in Centos to Group
usermod -a -G ftp angelimus

-a = append user in group
-G = new list of supplementary GROUPS
ftp = group name

another example :

usermod -a -G ftp angelimus, porthos, socrates, delinios

3. How to limit user in centos 6
- Prevent User using SSH and FTP
usermod -s /sbin/nologin mynewssh 
- User only using VPN
vi /etc/ppp/chap-secrets
angelimusVPN pptpd pass900 *



4. How to lock user in centos 6
usermod -L angelimus

5. How to remove user in centos 6
userdel angelimus
just delete user account

userdel -r angelimus
-r = remove angelimus home directory too

6. How to force expired user password in Centos 6
chage -d 0 angelimus

7. How to view user password in Centos 6
cat /etc/passwd

0 comments:

Post a Comment