summaryrefslogtreecommitdiffstats
path: root/rescue/genpasswd
diff options
context:
space:
mode:
authorMaarten Vanraes <alien@mageia.org>2011-10-24 18:05:36 +0000
committerMaarten Vanraes <alien@mageia.org>2011-10-24 18:05:36 +0000
commit3d49f9dfdfcc1c5450320fde1b0702abfd5e9231 (patch)
tree0143632fd8b255c90fdb39a4b527f5dfeb81c820 /rescue/genpasswd
parentbc48f7bd3456ca0a6f0003cfaabaf65669998a60 (diff)
downloaddrakx-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-xrescue/genpasswd10
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";