Nasser Heidari

2009-02-17

Creating an encrypted password

Filed under: Linux — Nasser Heidari @ 18:50

If you want to add a user to linux system , normaly you need to add user and then assign a password to user with passwd command .

you can use -p switch while adding user to assign password , but you need to pass an encrypted password .

there is a two way for creating encrypted password:

#openssl passwd -1 <MYPASS>
$1$ZZLfAZpL$mwVBijRFpr0EBBk3l7nY8.

# useradd -p ‘$1$ZZLfAZpL$mwVBijRFpr0EBBk3l7nY8.’ nasser

or

#perl -e ‘print crypt(“password”, “MYPASS”),”\n”‘
MYhWg5VCf/bwA

# useradd -p ‘MYhWg5VCf/bwA’ nasser

Advertisements

Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: