diff options
author | Maarten Vanraes <alien@mageia.org> | 2011-10-24 18:05:36 +0000 |
---|---|---|
committer | Maarten Vanraes <alien@mageia.org> | 2011-10-24 18:05:36 +0000 |
commit | 3d49f9dfdfcc1c5450320fde1b0702abfd5e9231 (patch) | |
tree | 0143632fd8b255c90fdb39a4b527f5dfeb81c820 /rescue/genpasswd | |
parent | bc48f7bd3456ca0a6f0003cfaabaf65669998a60 (diff) | |
download | drakx-3d49f9dfdfcc1c5450320fde1b0702abfd5e9231.tar drakx-3d49f9dfdfcc1c5450320fde1b0702abfd5e9231.tar.gz drakx-3d49f9dfdfcc1c5450320fde1b0702abfd5e9231.tar.bz2 drakx-3d49f9dfdfcc1c5450320fde1b0702abfd5e9231.tar.xz drakx-3d49f9dfdfcc1c5450320fde1b0702abfd5e9231.zip |
- add screen
- add dropbear
- add etc/shells
- add script that set password and start ssh server
Diffstat (limited to 'rescue/genpasswd')
-rwxr-xr-x | rescue/genpasswd | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rescue/genpasswd b/rescue/genpasswd new file mode 100755 index 000000000..328ced265 --- /dev/null +++ b/rescue/genpasswd @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +system "stty -echo"; +print STDERR "Give a password: "; +chomp($word = <STDIN>); +print STDERR "\n"; +system "stty echo"; + +print crypt($word, join('', ('.', '/', 0..9, 'A'..'Z', 'a'..'z')[rand 64, rand 64])); +print "\n"; |