Skip to content

Commit 03fe51e

Browse files
authored
Update gce-enable-ssh.sh
1 parent 93763bf commit 03fe51e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

gce-enable-ssh.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ sudo /etc/init.d/ssh reload
1212
echo "adding user '$1'"
1313
sudo adduser $1 --gecos "First Last,RoomNumber,WorkPhone,HomePhone" --disabled-password
1414

15-
PASSWD=`openssl rand -base64 8`
15+
PASSWD=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 12 | head -n 1`
1616
echo "setting user password to: $PASSWD"
1717
echo "$1:$PASSWD" | sudo chpasswd
1818

0 commit comments

Comments
 (0)