Subscribe Us


Breaking

Recent In Voip

Popular

Comments

Recent

How to Add User without User Add command

 

Step 1 : User information is stored in /etc/passwd
 Edit /etc/passwd
abhaykumar:x:1006:1006::/home/abhaykumar:/bin/bash




Explaination of Fields:-
username-abhaykumar
x- encrypted password
 user ID-1006
GID  -1006
:: -Gecos -Comment (add anyting like Name,email,address)
home directory -/home/abhaykumar
shell- /bin/bash

step 2:

Edit /etc/shadow

Note-/etc/shadow shows encrypted password for user account

Step3. Assign group to user

abhaykumar:x:1006:
Note-/etc/group - file which stores group information.

step 4.
go to /home/

mkdir -p /home/abhaykumar

cp -v /etc/skel/.* /home/abhaykumar



‘/etc/skel/.bash_logout’ -> ‘/home/abhaykumar/.bash_logout’
‘/etc/skel/.bash_profile’ -> ‘/home/abhaykumar/.bash_profile’
‘/etc/skel/.bashrc’ -> ‘/home/abhaykumar/.bashrc’
cp: omitting directory ‘/etc/skel/.mozilla’

Note :- /etc/skel file contain 3 neccesary files .bash_logout,.bash_profile,.bashrc.
          for viewing this file we need to use ls -al
- a to view hidden files


Step 5: - login using su - abhaykumar


I apperciate any Suggestion or question regarding this post .

0 on: "How to Add User without User Add command"