Shadow password in command line

Gokul

New Member
Joined
Jan 5, 2018
Messages
16
Reaction score
9
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,461
Reaction score
2,077
Credits
10,209
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
9
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
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online


Top