$ useradd -m -p $(perl -e’print crypt(“passwordscelta”, “stigghiola”)’) user

The crypt function takes a password, key, as a string, and a salt character array which is described below, and returns a printable ASCII string which starts with another salt. It is believed that, given the output of the function, the best way to find a key that will produce that output is to guess values of key until the original value of key is found.

(from http://en.wikipedia.org/wiki/Crypt_(Unix))

View this command to comment, vote or add to favourites
View all commands by 0disse0

commandlinefu.com

by David Winterbottom (codeinthehole.com)


Tags: