Categories
Linux

How To Create User In Linux

How To Create User In Linux

In this post we will learn How To Create User In Linux. To create a new user account in Linux distribution use command called useradd. The system administrator is responsible for creating account. Login as root user (or use sudo command).

User add Syntax:

useradd hightechnology

Set Password For user:

Let’s assume setting password for hightechnology

passwd hightechnology

Without password user account will be in locked status. To unlock the account, you need to use above passwd command. Use passwd command to assign a password and set password aging guidelines.

Set account disable date:

You can set date for the account to be disabled in the format YYYY-MM-DD with -e option while creating account itself:

useradd -e 2008-12-31 hightechnology

Set default password expiry:

The -f {days} option set number of days after the password expires until the account is disabled. (If 0 is specified, the account is disabled immediately after the password expires. If -1 is specified, the account is not be disabled after the password expires.)

useradd -e 2009-12-31 -f 30 hightechnology

 

 

Comments are closed.