Shadow password in command line

Gokul

New Member
Joined
Jan 5, 2018
Messages
16
Reaction score
10
Credits
0
hai , I am creating an address database script,I need to create a shadow password when user enter in command line.
welcome all if any help related to this.
 


JasKinasis

Well-Known Member
Joined
Apr 25, 2017
Messages
1,781
Reaction score
2,590
Credits
15,003
I'm not sure what you mean by Shadow password, but if you want to get a password from a user in a shell script and hide what the user types you can do this:
Code:
echo -n "Enter password: "
read -s passwordVariable
The -s parameter to read prevents read from echoing what the user types. So when they enter their password, it will not be shown on-screen...

Hope this helps!
 
OP
Gokul

Gokul

New Member
Joined
Jan 5, 2018
Messages
16
Reaction score
10
Credits
0
I'm not sure what you mean by Shadow password, but if you want to get a password from a user in a shell script and hide what the user types you can do this:
Code:
echo -n "Enter password: "
read -s passwordVariable
The -s parameter to read prevents read from echoing what the user types. So when they enter their password, it will not be shown on-screen...

Hope this helps!
Yeah i got it already and thanks for your concern
 

Members online


Top