aboutsummaryrefslogtreecommitdiffstats
path: root/get-password
diff options
context:
space:
mode:
authorGuillaume Rousse <guillomovitch@mandriva.org>2007-02-15 15:10:39 +0000
committerGuillaume Rousse <guillomovitch@mandriva.org>2007-02-15 15:10:39 +0000
commitb6be6092d4c8dc13ba019da78d082965a64bd925 (patch)
treef0626220ac35c97ea211fd024bc0033607a02dca /get-password
parentc6a1eebad47861794b33e89b64044217c5e1f176 (diff)
downloadrpm-helper-b6be6092d4c8dc13ba019da78d082965a64bd925.tar
rpm-helper-b6be6092d4c8dc13ba019da78d082965a64bd925.tar.gz
rpm-helper-b6be6092d4c8dc13ba019da78d082965a64bd925.tar.bz2
rpm-helper-b6be6092d4c8dc13ba019da78d082965a64bd925.tar.xz
rpm-helper-b6be6092d4c8dc13ba019da78d082965a64bd925.zip
get-password script
Diffstat (limited to 'get-password')
-rwxr-xr-xget-password21
1 files changed, 21 insertions, 0 deletions
diff --git a/get-password b/get-password
new file mode 100755
index 0000000..27cca4d
--- /dev/null
+++ b/get-password
@@ -0,0 +1,21 @@
+#!/bin/sh
+#---------------------------------------------------------------
+# Project : Mandrake Linux
+# Module : rpm-helper
+# File : get-password
+# Version : $Id: del-user,v 1.1.1.1 2002/07/09 15:04:21 flepied Exp $
+# Author : Guillaume Rousse
+# Created On : Thu Apr 1 00:00:46 2004
+# Purpose : helper script for rpm scriptlets to generate
+# a random password
+#---------------------------------------------------------------
+
+if [ -n "$1" ]; then
+ length=$1
+else
+ length=8
+fi
+
+perl -e "print map { (a..z,A..Z,0..9)[rand 62] } 0..$length"
+
+# get-password ends here