server and test desktop confi

This commit is contained in:
Hactarus 2016-11-23 10:57:56 +01:00
parent e9b586f53b
commit 54bd5338d2
5 changed files with 37 additions and 0 deletions

2
bin/c Executable file
View file

@ -0,0 +1,2 @@
#!/bin/bash
echo "$@" | bc -l

11
bin/pass Executable file
View file

@ -0,0 +1,11 @@
#!/bin/bash
if [ $# -eq 1 ]; then
LENGTH=$1
else
LENGTH=8
fi
cat /dev/urandom| tr -dc 'a-zA-Z0-9' | fold -w $LENGTH| head -n 1
cat /dev/urandom| tr -dc 'a-zA-Z0-9-_!@#$%^&*()_+{}|:<>?='|fold -w $LENGTH| head -n 1| grep -i '[!@#$%^&*()_+{}|:<>?=]'
pw=$(pwgen -Bs $LENGTH)
echo $pw " " $(openssl passwd -1 -salt $(pwgen -s 8 -1) $pw)
pw=123456