Last updated on May 5th, 2016 at 01:30 am

Create user group in linux, User management is very easy in Linux. Below steps will show you on how to create user group in linux and set the user password as non expiry. Also we will show you how to add user to a newly created group. Once that is done we will set that user password to non expiry.

For that first we need to use command groupadd and create a group named mygroup.

Next step is to use useradd command in order to create a user (myuser) and add this user to the above group created.

User Add Linux

If you see a message stating “Creating mailbox file: File exists” then all you need to do is use userdel -r command delete user cleanly and then use useradd command again as shown below.

User Add Linux

Once this is done use passwd command to set the password as non expiry. This means that password will never expire for this user.

$passwd -x -1 myuser
Adjusting aging data for user myuser.
passwd: Success
$

That is all. You have now created a user, group in Linux and also know how to set user password as non expiry.

Leave a Reply

Your email address will not be published. Required fields are marked *