Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
This seemed to work ok, but i was alerted by a freind that this was not a very securly encrypted password. He told me to look at /etc/shadow and see the difference between an account created via the system, and one using my script.my @chars = ('a'..'z', 'A'..'Z', 0..9); my $password = do {{ local $_ = join "" => map {$chars [rand @chars]} 1..8; redo unless /[a-z]/ && /[A-Z]/ && /\d/; $_; }}; my $salt = join '', ('.', '/', 0..9, 'A'..'Z', 'a'..'z')[rand 64, rand 64]; my $encrypted_pass = crypt($password, $salt);
How can i make my passwords like the ones created by the system?system:$1$52060970$luRfo2g2xith2rfv8fWC31:12176:0:99999:7::: myscript:$1$52075700$:12176::::::
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Shadow Passwords
by Util (Priest) on May 03, 2003 at 17:16 UTC | |
|
Re: Shadow Passwords
by dug (Chaplain) on May 03, 2003 at 16:00 UTC | |
|
Re: Shadow Passwords
by halley (Prior) on May 03, 2003 at 15:32 UTC | |
by iburrell (Chaplain) on May 04, 2003 at 22:20 UTC | |
|
Re: Shadow Passwords
by mr_mischief (Monsignor) on May 03, 2003 at 16:16 UTC | |
|
Re: Shadow Passwords
by fokat (Deacon) on May 03, 2003 at 16:36 UTC | |
by Anonymous Monk on May 03, 2003 at 16:57 UTC | |
by fokat (Deacon) on May 03, 2003 at 18:05 UTC | |
|
Re: Shadow Passwords
by halley (Prior) on May 03, 2003 at 15:40 UTC | |
|
Re: Shadow Passwords
by richardX (Pilgrim) on May 04, 2003 at 04:37 UTC |