SlideShare a Scribd company logo
HOW​ ​TO​ ​ADD​ ​USER​ ​IN​ ​SYSTEM​ ​WITHOUT​ ​USERADD
COMMAND
When​ ​you​ ​add​ ​any​ ​user​ ​in​ ​system​ ​.​ ​user​ ​details​ ​and​ ​group​ ​details​ ​are
stored​ ​in​ ​4​ ​files
● /etc/passwd​ ​-​ ​In​ ​this​ ​file​ ​the​ ​user​ ​informations​ ​are​ ​stored​ ​.
● /etc/group​ ​-​ ​In​ ​this​ ​file​ ​the​ ​user​ ​group​ ​informations​ ​are​ ​stored​ ​.
● /etc/shadow​ ​-​ ​In​ ​this​ ​file​ ​the​ ​password​ ​of​ ​user​ ​are​ ​stored​ ​.
● /etc/​ ​gshadow​ ​-​ ​In​ ​this​ ​file​ ​the​ ​user​ ​group​ ​password​ ​are​ ​stored​ ​.
Step​ ​1​ ​:-
Become​ ​a​ ​root​ ​user​ ​using​ ​su​ ​command
su
(enter​ ​your​ ​root​ ​password)
Open​ ​the​ ​file​ ​/etc/passwd​ ​using
nano​ ​/etc/passwd​ ​and​ ​go​ ​to​ ​the​ ​end​ ​of​ ​file
username:password(x):uid:gid:comment_block:home_directory:
user_shell
● Username​ ​:-​ ​Add​ ​Name​ ​of​ ​user​ ​you​ ​want​ ​to​ ​create​ ​.
● Password​ ​:-​ ​/etc/passwd​ ​file​ ​doesn’t​ ​save​ ​the​ ​password​ ​of​ ​user​ ​.just​ ​put
here​ ​-->​ ​x
● uid(user​ ​ID)​ ​:-​ ​In​ ​this​ ​field​ ​you​ ​want​ ​to​ ​add​ ​uid​ ​normally​ ​uid​ ​start​ ​with​ ​1000
but​ ​you​ ​check​ ​previous​ ​user​ ​uid​ ​and​ ​then​ ​assign​ ​uid​ ​to​ ​your​ ​user​ ​is​ ​plue​ ​1
● gid(group​ ​ID)​ ​:-​ ​In​ ​this​ ​field​ ​you​ ​want​ ​to​ ​add​ ​gid​ ​normally​ ​gid​ ​start​ ​with​ ​1000
but​ ​you​ ​check​ ​previous​ ​group​ ​gid​ ​and​ ​then​ ​assign​ ​gid​ ​to​ ​your​ ​group​ ​is​ ​plue
1
● Comment​ ​field​ ​:-​ ​In​ ​this​ ​you​ ​can​ ​comment​ ​or​ ​leave​ ​blank​ ​.
● Home_Directory​ ​:-​ ​Home​ ​Directory​ ​is​ ​required​ ​for​ ​store​ ​user​ ​files​ ​.basically
home_directory​ ​are​ ​store​ ​in​ ​/home​ ​with​ ​your​ ​user​ ​name​ ​for​ ​example
/home/akki
● User_shell​ ​:-​ ​User_shell​ ​is​ ​required​ ​for​ ​interaction​ ​with​ ​kernel​ ​.you​ ​can
available​ ​shells​ ​in​ ​/etc/shells​ ​files​ ​and​ ​assign​ ​any​ ​one​ ​like​ ​/bin/bash​ ​.
Add​ ​one​ ​line​ ​at​ ​end​ ​of​ ​file​ ​Like​ ​below​ ​:-
akki:x:1010:1010:hii:/home/akki:/bin/bash
Save​ ​that​ ​file
Step​ ​2​ ​:-
Open​ ​the​ ​file​ ​/etc/group​ ​using
nano​ ​/etc/group​ ​and​ ​go​ ​to​ ​the​ ​end​ ​of​ ​file
groupname:password(x):gid:
● groupname​ ​:-​ ​Add​ ​Name​ ​of​ ​group​ ​you​ ​want​ ​to​ ​create​ ​(It​ ​same​ ​to​ ​user
name).
● Password​ ​:-​ ​/etc/group​ ​file​ ​doesn’t​ ​save​ ​the​ ​password​ ​of​ ​group​ ​.just​ ​put
here​ ​-->​ ​x
● gid(group​ ​ID)​ ​:-​ ​This​ ​gid​ ​same​ ​which​ ​added​ ​in​ ​/etc/passwd​ ​file
● user_list​ ​:-​ ​A​ ​​ ​list​ ​​ ​of​ ​​ ​the​ ​​ ​usernames​ ​that​ ​are​ ​members​ ​of​ ​this​ ​group,
separated​ ​by​ ​commas​ ​(This​ ​leave​ ​blank)​ ​.
Add​ ​one​ ​line​ ​at​ ​end​ ​of​ ​file​ ​Like​ ​below​ ​:-
Akki:x:1010:
Save​ ​that​ ​file
Step​ ​3​ ​:-
Then​ ​type​ ​on​ ​terminal
passwd​ ​akki
(akki​ ​is​ ​your​ ​user​ ​name)
(enter​ ​new​ ​password)
Step​ ​4​ ​:-
Then​ ​login​ ​to​ ​your​ ​user
su​ ​-​ ​akki
(it​ ​give​ ​one​ ​error--->​ ​No​ ​directory,​ ​logging​ ​in​ ​with​ ​HOME=/)
It​ ​because​ ​we​ ​not​ ​create​ ​our​ ​home​ ​dirctory
Exit
Step​ ​5:-
Then​ ​Create​ ​your​ ​Home​ ​Directory​ ​with
mkdir​ ​/home/akki
(It​ ​create​ ​your​ ​home​ ​directory)
chown​ ​akki:akki​ ​/home/akki
(It​ ​change​ ​the​ ​owner​ ​and​ ​group​ ​of​ ​akki​ ​directory​ ​to​ ​akki​ ​)
su​ ​-​ ​akki
ls​ ​-la
(your​ ​home​ ​directory​ ​is​ ​empty)
exit
Step​ ​6:-
Then​ ​go​ ​to​ ​the​ ​/etc
cd​ ​/etc/skel
ls
cp​ ​-vr​ ​.​ ​/home/akki
(It​ ​copy​ ​skel​ ​files​ ​to​ ​your​ ​home​ ​directory​ ​which​ ​is​ ​required​ ​when​ ​you​ ​login)
cd​ ​/home/akki
ls​ ​-la
su​ ​-​ ​akki
Your​ ​user​ ​is​ ​Created
Example​ ​:-
king-thehacker@kingthehacker:/home$​ ​​su
Password:
root@kingthehacker:/home#​ ​​nano​ ​/etc/passwd
(add​ ​line)
root@kingthehacker:/home#​ ​​tail​ ​-1​ ​/etc/passwd
Salu:x:1010:1010:Hero:/home/Salu:/bin/bash
root@kingthehacker:/home#​ ​​nano​ ​/etc/group
(add​ ​line)
root@kingthehacker:/home#​ ​​tail​ ​-1​ ​/etc/group
Salu:x:1010
root@kingthehacker:/home#​ ​​passwd​ ​Salu
Enter​ ​new​ ​UNIX​ ​password:
Retype​ ​new​ ​UNIX​ ​password:
passwd:​ ​password​ ​updated​ ​successfully
root@kingthehacker:/home#​​ ​su​ ​-​ ​Salu
No​ ​directory,​ ​logging​ ​in​ ​with​ ​HOME=/
(error)
Salu@kingthehacker:/$​ ​​exit
logout
root@kingthehacker:/home#​ ​​mkdir​ ​/home/Salu
root@kingthehacker:/home#​ ​​ls​ ​-la​ ​/home
total​ ​44
drwxr-xr-x​ ​​ ​6​ ​root root 4096​ ​Aug​ ​22​ ​22:19​ ​.
drwxr-xr-x​ ​38​ ​king-thehacker​ ​king-thehacker​ ​16384​ ​Aug​ ​22​ ​21:10​ ​king-thehacker
drwxr-xr-x​ ​​ ​4​ ​lfs lfs 4096​ ​Jun​ ​22​ ​14:28​ ​lfs
drwxr-xr-x​ ​​ ​2​ ​root root 4096​ ​Aug​ ​22​ ​22:19​ ​Salu
r​oot@kingthehacker:/home#​ ​​chown​ ​Salu:Salu​ ​/home/Salu
Salu@kingthehacker:~$​ ​​ls​ ​-la​ ​/home/
total​ ​44
drwxr-xr-x​ ​​ ​6​ ​root root 4096​ ​Aug​ ​22​ ​22:19​ ​.
drwxr-xr-x​ ​24​ ​root root 4096​ ​Aug​ ​​ ​9​ ​19:59​ ​..
drwxr-xr-x​ ​38​ ​king-thehacker​ ​king-thehacker​ ​16384​ ​Aug​ ​22​ ​21:10​ ​king-thehacker
drwxr-xr-x​ ​​ ​4​ ​lfs lfs 4096​ ​Jun​ ​22​ ​14:28​ ​lfs
drwxr-xr-x​ ​​ ​2​ ​Salu Salu 4096​ ​Aug​ ​22​ ​22:20​ ​Salu
root@kingthehacker:/home#​​ ​su​ ​-​ ​Salu
Salu@kingthehacker:~$​ ​​ls
Salu@kingthehacker:~$​ ​​exit
logout
root@kingthehacker:/home#​ ​​cd​ ​/etc/skel/
root@kingthehacker:/etc/skel#​ ​​ls​ ​-la
total​ ​40
drwxr-xr-x​ ​​ ​​ ​2​ ​root​ ​root​ ​​ ​4096​ ​Jul​ ​​ ​9​ ​10:00​ ​.
drwxr-xr-x​ ​138​ ​root​ ​root​ ​12288​ ​Aug​ ​22​ ​22:18​ ​..
-rw-r--r--​ ​​ ​​ ​1​ ​root​ ​root​ ​​ ​​ ​220​ ​Sep​ ​​ ​1​ ​​ ​2015​ ​.bash_logout
-rw-r--r--​ ​​ ​​ ​1​ ​root​ ​root​ ​​ ​3771​ ​Sep​ ​​ ​1​ ​​ ​2015​ ​.bashrc
-rw-r--r--​ ​​ ​​ ​1​ ​root​ ​root​ ​​ ​8980​ ​Apr​ ​20​ ​​ ​2016​ ​examples.desktop
-rw-r--r--​ ​​ ​​ ​1​ ​root​ ​root​ ​​ ​​ ​655​ ​Jun​ ​24​ ​​ ​2016​ ​.profile
root@kingthehacker:/etc/skel#​​ ​cp​ ​-vr​ ​.​ ​/home/Salu/
'./.bash_logout'​ ​->​ ​'/home/Salu/./.bash_logout'
'./.bashrc'​ ​->​ ​'/home/Salu/./.bashrc'
'./.profile'​ ​->​ ​'/home/Salu/./.profile'
'./examples.desktop'​ ​->​ ​'/home/Salu/./examples.desktop'
root@kingthehacker:/etc/skel#​ ​​cd​ ​/home/Salu/
root@kingthehacker:/home/Salu#​ ​​ls​ ​-la
total​ ​36
drwxr-xr-x​ ​2​ ​Salu​ ​Salu​ ​4096​ ​Aug​ ​22​ ​22:20​ ​.
drwxr-xr-x​ ​6​ ​root​ ​root​ ​4096​ ​Aug​ ​22​ ​22:19​ ​..
-rw-------​ ​1​ ​Salu​ ​Salu 8​ ​Aug​ ​22​ ​22:19​ ​.bash_history
-rw-r--r--​ ​1​ ​root​ ​root​ ​​ ​220​ ​Aug​ ​22​ ​22:20​ ​.bash_logout
-rw-r--r--​ ​1​ ​root​ ​root​ ​3771​ ​Aug​ ​22​ ​22:20​ ​.bashrc
-rw-r--r--​ ​1​ ​root​ ​root​ ​8980​ ​Aug​ ​22​ ​22:20​ ​examples.desktop
-rw-r--r--​ ​1​ ​root​ ​root​ ​​ ​655​ ​Aug​ ​22​ ​22:20​ ​.profile
root@kingthehacker:/home/Salu#​ ​​su​ ​-​ ​Salu
Salu@kingthehacker:~$​ ​​ls​ ​-la
total​ ​36
drwxr-xr-x​ ​2​ ​Salu​ ​Salu​ ​4096​ ​Aug​ ​22​ ​22:20​ ​.
drwxr-xr-x​ ​6​ ​root​ ​root​ ​4096​ ​Aug​ ​22​ ​22:19​ ​..
-rw-------​ ​1​ ​Salu​ ​Salu 8​ ​Aug​ ​22​ ​22:19​ ​.bash_history
-rw-r--r--​ ​1​ ​root​ ​root​ ​​ ​220​ ​Aug​ ​22​ ​22:20​ ​.bash_logout
-rw-r--r--​ ​1​ ​root​ ​root​ ​3771​ ​Aug​ ​22​ ​22:20​ ​.bashrc
-rw-r--r--​ ​1​ ​root​ ​root​ ​8980​ ​Aug​ ​22​ ​22:20​ ​examples.desktop
-rw-r--r--​ ​1​ ​root​ ​root​ ​​ ​655​ ​Aug​ ​22​ ​22:20​ ​.profile
Salu@kingthehacker:~$

More Related Content

What's hot (20)

PDF
Konfigurasi freeradius server
Walid Umar
 
PDF
Rhel 6.2 complete ebook
Yash Gulati
 
DOCX
Rhel 6.2 complete ebook
Yash Gulati
 
PPTX
The Web, one huge database ...
Michael Hausenblas
 
PPT
spug_2008-08
colinmeyer
 
PPTX
Twas the night before Malware...
DoktorMandrake
 
ODP
Sahul
sahul azzez m.i
 
PDF
A bug bounty tale: Chrome, stylesheets, cookies, and AES
cgvwzq
 
PDF
Character_Device_drvier_pc
Rashila Rr
 
PPTX
20171014 tips for manipulating filesystem in julia
岳華 杜
 
PDF
Se meu elefante falasse
Dickson S. Guedes
 
PDF
Web Application Security 101 - 05 Enumeration
Websecurify
 
PDF
Cli2 Bibalex
Ahmed Mekkawy
 
PDF
Tablespaces
Vinay Thota
 
TXT
Mkscript sh
Ben Pope
 
PPTX
Distribuido
Jose Rojas
 
PPTX
Chap 5 php files part-2
monikadeshmane
 
PDF
Fluentd intro at Tajo seoul meetup
Dongmin Yu
 
PPTX
Ch3(working with file)
Chhom Karath
 
Konfigurasi freeradius server
Walid Umar
 
Rhel 6.2 complete ebook
Yash Gulati
 
Rhel 6.2 complete ebook
Yash Gulati
 
The Web, one huge database ...
Michael Hausenblas
 
spug_2008-08
colinmeyer
 
Twas the night before Malware...
DoktorMandrake
 
A bug bounty tale: Chrome, stylesheets, cookies, and AES
cgvwzq
 
Character_Device_drvier_pc
Rashila Rr
 
20171014 tips for manipulating filesystem in julia
岳華 杜
 
Se meu elefante falasse
Dickson S. Guedes
 
Web Application Security 101 - 05 Enumeration
Websecurify
 
Cli2 Bibalex
Ahmed Mekkawy
 
Tablespaces
Vinay Thota
 
Mkscript sh
Ben Pope
 
Distribuido
Jose Rojas
 
Chap 5 php files part-2
monikadeshmane
 
Fluentd intro at Tajo seoul meetup
Dongmin Yu
 
Ch3(working with file)
Chhom Karath
 

Similar to How to add user in system without useradd command (20)

PPTX
7 - User Administration in Red Hat
Shafaan Khaliq Bhatti
 
PDF
Manage Local Users and Groups - RHCSA (RH124)
RHCSA Guru
 
PDF
A Complete Guide to “useradd” Command in Linux with Examples _ Hostbillo
KiyanaSharma1
 
PPTX
Lecturehjiwiiiwiiiwiiiiwiiijjwjiwii.pptx
ilhammatinzai842
 
PPTX
Presentation1
Engr Zardari Saddam
 
PDF
Linux fundamental - Chap 13 account management
Kenny (netman)
 
PDF
Unit 6 adding new users and storage
Bhushan Pawar -Java Trainer
 
PPT
Unix Administration 3
Information Technology
 
PPT
Common linux ubuntu commands overview
Ameer Sameer
 
DOCX
Basic linux commands
Rogério Pereira Falcone
 
PDF
Linux Commands, Characters, File Navigation Cheat Sheet
mdtasneem6397
 
PDF
Users and groups in Linux
Knoldus Inc.
 
PPSX
User Administration in Linux
SAMUEL OJO
 
PPTX
Linux commands
shekhar70
 
PPTX
User management
Mufaddal Haidermota
 
DOCX
lec2.docx
ismailaboshatra
 
PPT
4. Centos Administration
Mohd yasin Karim
 
PDF
User and group administration in Linux
Mohammed Yazdani
 
PPT
Sls01 Lecture02 Linux In Practice
Qasim Khawaja
 
7 - User Administration in Red Hat
Shafaan Khaliq Bhatti
 
Manage Local Users and Groups - RHCSA (RH124)
RHCSA Guru
 
A Complete Guide to “useradd” Command in Linux with Examples _ Hostbillo
KiyanaSharma1
 
Lecturehjiwiiiwiiiwiiiiwiiijjwjiwii.pptx
ilhammatinzai842
 
Presentation1
Engr Zardari Saddam
 
Linux fundamental - Chap 13 account management
Kenny (netman)
 
Unit 6 adding new users and storage
Bhushan Pawar -Java Trainer
 
Unix Administration 3
Information Technology
 
Common linux ubuntu commands overview
Ameer Sameer
 
Basic linux commands
Rogério Pereira Falcone
 
Linux Commands, Characters, File Navigation Cheat Sheet
mdtasneem6397
 
Users and groups in Linux
Knoldus Inc.
 
User Administration in Linux
SAMUEL OJO
 
Linux commands
shekhar70
 
User management
Mufaddal Haidermota
 
lec2.docx
ismailaboshatra
 
4. Centos Administration
Mohd yasin Karim
 
User and group administration in Linux
Mohammed Yazdani
 
Sls01 Lecture02 Linux In Practice
Qasim Khawaja
 
Ad

Recently uploaded (20)

DOC
MRRS Strength and Durability of Concrete
CivilMythili
 
PPTX
MobileComputingMANET2023 MobileComputingMANET2023.pptx
masterfake98765
 
PDF
Ethics and Trustworthy AI in Healthcare – Governing Sensitive Data, Profiling...
AlqualsaDIResearchGr
 
PPTX
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
PDF
Electrical Engineer operation Supervisor
ssaruntatapower143
 
PPTX
Lecture 1 Shell and Tube Heat exchanger-1.pptx
mailforillegalwork
 
PPTX
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
PDF
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
PDF
Design Thinking basics for Engineers.pdf
CMR University
 
PPTX
Green Building & Energy Conservation ppt
Sagar Sarangi
 
PDF
AI TECHNIQUES FOR IDENTIFYING ALTERATIONS IN THE HUMAN GUT MICROBIOME IN MULT...
vidyalalltv1
 
DOCX
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
PPTX
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
PDF
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
PDF
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
PDF
GTU Civil Engineering All Semester Syllabus.pdf
Vimal Bhojani
 
PDF
MAD Unit - 1 Introduction of Android IT Department
JappanMavani
 
PPTX
Damage of stability of a ship and how its change .pptx
ehamadulhaque
 
PPTX
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
PPTX
DATA BASE MANAGEMENT AND RELATIONAL DATA
gomathisankariv2
 
MRRS Strength and Durability of Concrete
CivilMythili
 
MobileComputingMANET2023 MobileComputingMANET2023.pptx
masterfake98765
 
Ethics and Trustworthy AI in Healthcare – Governing Sensitive Data, Profiling...
AlqualsaDIResearchGr
 
Mechanical Design of shell and tube heat exchangers as per ASME Sec VIII Divi...
shahveer210504
 
Electrical Engineer operation Supervisor
ssaruntatapower143
 
Lecture 1 Shell and Tube Heat exchanger-1.pptx
mailforillegalwork
 
VITEEE 2026 Exam Details , Important Dates
SonaliSingh127098
 
MAD Unit - 2 Activity and Fragment Management in Android (Diploma IT)
JappanMavani
 
Design Thinking basics for Engineers.pdf
CMR University
 
Green Building & Energy Conservation ppt
Sagar Sarangi
 
AI TECHNIQUES FOR IDENTIFYING ALTERATIONS IN THE HUMAN GUT MICROBIOME IN MULT...
vidyalalltv1
 
CS-802 (A) BDH Lab manual IPS Academy Indore
thegodhimself05
 
Worm gear strength and wear calculation as per standard VB Bhandari Databook.
shahveer210504
 
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
International Journal of Information Technology Convergence and services (IJI...
ijitcsjournal4
 
GTU Civil Engineering All Semester Syllabus.pdf
Vimal Bhojani
 
MAD Unit - 1 Introduction of Android IT Department
JappanMavani
 
Damage of stability of a ship and how its change .pptx
ehamadulhaque
 
Arduino Based Gas Leakage Detector Project
CircuitDigest
 
DATA BASE MANAGEMENT AND RELATIONAL DATA
gomathisankariv2
 
Ad

How to add user in system without useradd command

  • 1. HOW​ ​TO​ ​ADD​ ​USER​ ​IN​ ​SYSTEM​ ​WITHOUT​ ​USERADD COMMAND When​ ​you​ ​add​ ​any​ ​user​ ​in​ ​system​ ​.​ ​user​ ​details​ ​and​ ​group​ ​details​ ​are stored​ ​in​ ​4​ ​files ● /etc/passwd​ ​-​ ​In​ ​this​ ​file​ ​the​ ​user​ ​informations​ ​are​ ​stored​ ​. ● /etc/group​ ​-​ ​In​ ​this​ ​file​ ​the​ ​user​ ​group​ ​informations​ ​are​ ​stored​ ​. ● /etc/shadow​ ​-​ ​In​ ​this​ ​file​ ​the​ ​password​ ​of​ ​user​ ​are​ ​stored​ ​. ● /etc/​ ​gshadow​ ​-​ ​In​ ​this​ ​file​ ​the​ ​user​ ​group​ ​password​ ​are​ ​stored​ ​. Step​ ​1​ ​:- Become​ ​a​ ​root​ ​user​ ​using​ ​su​ ​command su (enter​ ​your​ ​root​ ​password) Open​ ​the​ ​file​ ​/etc/passwd​ ​using nano​ ​/etc/passwd​ ​and​ ​go​ ​to​ ​the​ ​end​ ​of​ ​file username:password(x):uid:gid:comment_block:home_directory: user_shell ● Username​ ​:-​ ​Add​ ​Name​ ​of​ ​user​ ​you​ ​want​ ​to​ ​create​ ​. ● Password​ ​:-​ ​/etc/passwd​ ​file​ ​doesn’t​ ​save​ ​the​ ​password​ ​of​ ​user​ ​.just​ ​put here​ ​-->​ ​x ● uid(user​ ​ID)​ ​:-​ ​In​ ​this​ ​field​ ​you​ ​want​ ​to​ ​add​ ​uid​ ​normally​ ​uid​ ​start​ ​with​ ​1000 but​ ​you​ ​check​ ​previous​ ​user​ ​uid​ ​and​ ​then​ ​assign​ ​uid​ ​to​ ​your​ ​user​ ​is​ ​plue​ ​1 ● gid(group​ ​ID)​ ​:-​ ​In​ ​this​ ​field​ ​you​ ​want​ ​to​ ​add​ ​gid​ ​normally​ ​gid​ ​start​ ​with​ ​1000 but​ ​you​ ​check​ ​previous​ ​group​ ​gid​ ​and​ ​then​ ​assign​ ​gid​ ​to​ ​your​ ​group​ ​is​ ​plue 1 ● Comment​ ​field​ ​:-​ ​In​ ​this​ ​you​ ​can​ ​comment​ ​or​ ​leave​ ​blank​ ​. ● Home_Directory​ ​:-​ ​Home​ ​Directory​ ​is​ ​required​ ​for​ ​store​ ​user​ ​files​ ​.basically home_directory​ ​are​ ​store​ ​in​ ​/home​ ​with​ ​your​ ​user​ ​name​ ​for​ ​example /home/akki ● User_shell​ ​:-​ ​User_shell​ ​is​ ​required​ ​for​ ​interaction​ ​with​ ​kernel​ ​.you​ ​can available​ ​shells​ ​in​ ​/etc/shells​ ​files​ ​and​ ​assign​ ​any​ ​one​ ​like​ ​/bin/bash​ ​. Add​ ​one​ ​line​ ​at​ ​end​ ​of​ ​file​ ​Like​ ​below​ ​:-
  • 2. akki:x:1010:1010:hii:/home/akki:/bin/bash Save​ ​that​ ​file Step​ ​2​ ​:- Open​ ​the​ ​file​ ​/etc/group​ ​using nano​ ​/etc/group​ ​and​ ​go​ ​to​ ​the​ ​end​ ​of​ ​file groupname:password(x):gid: ● groupname​ ​:-​ ​Add​ ​Name​ ​of​ ​group​ ​you​ ​want​ ​to​ ​create​ ​(It​ ​same​ ​to​ ​user name). ● Password​ ​:-​ ​/etc/group​ ​file​ ​doesn’t​ ​save​ ​the​ ​password​ ​of​ ​group​ ​.just​ ​put here​ ​-->​ ​x ● gid(group​ ​ID)​ ​:-​ ​This​ ​gid​ ​same​ ​which​ ​added​ ​in​ ​/etc/passwd​ ​file ● user_list​ ​:-​ ​A​ ​​ ​list​ ​​ ​of​ ​​ ​the​ ​​ ​usernames​ ​that​ ​are​ ​members​ ​of​ ​this​ ​group, separated​ ​by​ ​commas​ ​(This​ ​leave​ ​blank)​ ​. Add​ ​one​ ​line​ ​at​ ​end​ ​of​ ​file​ ​Like​ ​below​ ​:- Akki:x:1010: Save​ ​that​ ​file Step​ ​3​ ​:- Then​ ​type​ ​on​ ​terminal passwd​ ​akki (akki​ ​is​ ​your​ ​user​ ​name) (enter​ ​new​ ​password) Step​ ​4​ ​:- Then​ ​login​ ​to​ ​your​ ​user su​ ​-​ ​akki (it​ ​give​ ​one​ ​error--->​ ​No​ ​directory,​ ​logging​ ​in​ ​with​ ​HOME=/) It​ ​because​ ​we​ ​not​ ​create​ ​our​ ​home​ ​dirctory
  • 3. Exit Step​ ​5:- Then​ ​Create​ ​your​ ​Home​ ​Directory​ ​with mkdir​ ​/home/akki (It​ ​create​ ​your​ ​home​ ​directory) chown​ ​akki:akki​ ​/home/akki (It​ ​change​ ​the​ ​owner​ ​and​ ​group​ ​of​ ​akki​ ​directory​ ​to​ ​akki​ ​) su​ ​-​ ​akki ls​ ​-la (your​ ​home​ ​directory​ ​is​ ​empty) exit Step​ ​6:- Then​ ​go​ ​to​ ​the​ ​/etc cd​ ​/etc/skel ls cp​ ​-vr​ ​.​ ​/home/akki (It​ ​copy​ ​skel​ ​files​ ​to​ ​your​ ​home​ ​directory​ ​which​ ​is​ ​required​ ​when​ ​you​ ​login) cd​ ​/home/akki ls​ ​-la su​ ​-​ ​akki Your​ ​user​ ​is​ ​Created Example​ ​:- king-thehacker@kingthehacker:/home$​ ​​su Password: root@kingthehacker:/home#​ ​​nano​ ​/etc/passwd (add​ ​line) root@kingthehacker:/home#​ ​​tail​ ​-1​ ​/etc/passwd
  • 4. Salu:x:1010:1010:Hero:/home/Salu:/bin/bash root@kingthehacker:/home#​ ​​nano​ ​/etc/group (add​ ​line) root@kingthehacker:/home#​ ​​tail​ ​-1​ ​/etc/group Salu:x:1010 root@kingthehacker:/home#​ ​​passwd​ ​Salu Enter​ ​new​ ​UNIX​ ​password: Retype​ ​new​ ​UNIX​ ​password: passwd:​ ​password​ ​updated​ ​successfully root@kingthehacker:/home#​​ ​su​ ​-​ ​Salu No​ ​directory,​ ​logging​ ​in​ ​with​ ​HOME=/ (error) Salu@kingthehacker:/$​ ​​exit logout root@kingthehacker:/home#​ ​​mkdir​ ​/home/Salu root@kingthehacker:/home#​ ​​ls​ ​-la​ ​/home total​ ​44 drwxr-xr-x​ ​​ ​6​ ​root root 4096​ ​Aug​ ​22​ ​22:19​ ​. drwxr-xr-x​ ​38​ ​king-thehacker​ ​king-thehacker​ ​16384​ ​Aug​ ​22​ ​21:10​ ​king-thehacker drwxr-xr-x​ ​​ ​4​ ​lfs lfs 4096​ ​Jun​ ​22​ ​14:28​ ​lfs drwxr-xr-x​ ​​ ​2​ ​root root 4096​ ​Aug​ ​22​ ​22:19​ ​Salu r​oot@kingthehacker:/home#​ ​​chown​ ​Salu:Salu​ ​/home/Salu Salu@kingthehacker:~$​ ​​ls​ ​-la​ ​/home/ total​ ​44 drwxr-xr-x​ ​​ ​6​ ​root root 4096​ ​Aug​ ​22​ ​22:19​ ​. drwxr-xr-x​ ​24​ ​root root 4096​ ​Aug​ ​​ ​9​ ​19:59​ ​.. drwxr-xr-x​ ​38​ ​king-thehacker​ ​king-thehacker​ ​16384​ ​Aug​ ​22​ ​21:10​ ​king-thehacker drwxr-xr-x​ ​​ ​4​ ​lfs lfs 4096​ ​Jun​ ​22​ ​14:28​ ​lfs drwxr-xr-x​ ​​ ​2​ ​Salu Salu 4096​ ​Aug​ ​22​ ​22:20​ ​Salu root@kingthehacker:/home#​​ ​su​ ​-​ ​Salu Salu@kingthehacker:~$​ ​​ls Salu@kingthehacker:~$​ ​​exit logout root@kingthehacker:/home#​ ​​cd​ ​/etc/skel/ root@kingthehacker:/etc/skel#​ ​​ls​ ​-la total​ ​40 drwxr-xr-x​ ​​ ​​ ​2​ ​root​ ​root​ ​​ ​4096​ ​Jul​ ​​ ​9​ ​10:00​ ​. drwxr-xr-x​ ​138​ ​root​ ​root​ ​12288​ ​Aug​ ​22​ ​22:18​ ​.. -rw-r--r--​ ​​ ​​ ​1​ ​root​ ​root​ ​​ ​​ ​220​ ​Sep​ ​​ ​1​ ​​ ​2015​ ​.bash_logout
  • 5. -rw-r--r--​ ​​ ​​ ​1​ ​root​ ​root​ ​​ ​3771​ ​Sep​ ​​ ​1​ ​​ ​2015​ ​.bashrc -rw-r--r--​ ​​ ​​ ​1​ ​root​ ​root​ ​​ ​8980​ ​Apr​ ​20​ ​​ ​2016​ ​examples.desktop -rw-r--r--​ ​​ ​​ ​1​ ​root​ ​root​ ​​ ​​ ​655​ ​Jun​ ​24​ ​​ ​2016​ ​.profile root@kingthehacker:/etc/skel#​​ ​cp​ ​-vr​ ​.​ ​/home/Salu/ './.bash_logout'​ ​->​ ​'/home/Salu/./.bash_logout' './.bashrc'​ ​->​ ​'/home/Salu/./.bashrc' './.profile'​ ​->​ ​'/home/Salu/./.profile' './examples.desktop'​ ​->​ ​'/home/Salu/./examples.desktop' root@kingthehacker:/etc/skel#​ ​​cd​ ​/home/Salu/ root@kingthehacker:/home/Salu#​ ​​ls​ ​-la total​ ​36 drwxr-xr-x​ ​2​ ​Salu​ ​Salu​ ​4096​ ​Aug​ ​22​ ​22:20​ ​. drwxr-xr-x​ ​6​ ​root​ ​root​ ​4096​ ​Aug​ ​22​ ​22:19​ ​.. -rw-------​ ​1​ ​Salu​ ​Salu 8​ ​Aug​ ​22​ ​22:19​ ​.bash_history -rw-r--r--​ ​1​ ​root​ ​root​ ​​ ​220​ ​Aug​ ​22​ ​22:20​ ​.bash_logout -rw-r--r--​ ​1​ ​root​ ​root​ ​3771​ ​Aug​ ​22​ ​22:20​ ​.bashrc -rw-r--r--​ ​1​ ​root​ ​root​ ​8980​ ​Aug​ ​22​ ​22:20​ ​examples.desktop -rw-r--r--​ ​1​ ​root​ ​root​ ​​ ​655​ ​Aug​ ​22​ ​22:20​ ​.profile root@kingthehacker:/home/Salu#​ ​​su​ ​-​ ​Salu Salu@kingthehacker:~$​ ​​ls​ ​-la total​ ​36 drwxr-xr-x​ ​2​ ​Salu​ ​Salu​ ​4096​ ​Aug​ ​22​ ​22:20​ ​. drwxr-xr-x​ ​6​ ​root​ ​root​ ​4096​ ​Aug​ ​22​ ​22:19​ ​.. -rw-------​ ​1​ ​Salu​ ​Salu 8​ ​Aug​ ​22​ ​22:19​ ​.bash_history -rw-r--r--​ ​1​ ​root​ ​root​ ​​ ​220​ ​Aug​ ​22​ ​22:20​ ​.bash_logout -rw-r--r--​ ​1​ ​root​ ​root​ ​3771​ ​Aug​ ​22​ ​22:20​ ​.bashrc -rw-r--r--​ ​1​ ​root​ ​root​ ​8980​ ​Aug​ ​22​ ​22:20​ ​examples.desktop -rw-r--r--​ ​1​ ​root​ ​root​ ​​ ​655​ ​Aug​ ​22​ ​22:20​ ​.profile Salu@kingthehacker:~$