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
commitb0cae796314f7c0ceda3d44f0fa74e55acd21b8b (patch)
tree0143632fd8b255c90fdb39a4b527f5dfeb81c820 /rescue/genpasswd
parent8b55d62379d30e5263c28604f229ec376a9fa72e (diff)
downloaddrakx-backup-do-not-use-b0cae796314f7c0ceda3d44f0fa74e55acd21b8b.tar
drakx-backup-do-not-use-b0cae796314f7c0ceda3d44f0fa74e55acd21b8b.tar.gz
drakx-backup-do-not-use-b0cae796314f7c0ceda3d44f0fa74e55acd21b8b.tar.bz2
drakx-backup-do-not-use-b0cae796314f7c0ceda3d44f0fa74e55acd21b8b.tar.xz
drakx-backup-do-not-use-b0cae796314f7c0ceda3d44f0fa74e55acd21b8b.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";