From fd4840f53c40b6290f526080939c83cc82c0e4c2 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Wed, 13 Jun 2018 12:53:52 +0100 Subject: [PATCH] etc/profile.d/functions --- etc/profile.d/functions | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/etc/profile.d/functions b/etc/profile.d/functions index ca658bea..5aafe57d 100644 --- a/etc/profile.d/functions +++ b/etc/profile.d/functions @@ -768,9 +768,10 @@ http_head() { fi } -random_string() { +password_create() { local len=${1:-30} - local chars=${2:-'[:alnum:] #$,;.:*@[]()?+=_%-'} + #local chars=${2:-'[:alnum:] #$,;.:*@[]()?+=_%-'} + local chars=${2:-'[:alnum:]#$,.@+=_-'} tr -cd "$chars" < /dev/urandom | head -c${1:-${len}} echo } -- 2.47.3