Invalid characters in linux password?
By John Peck •
I am trying to automate creating linux users using bash
# Below password does NOT work
#USER_PASS="Eb*rx>BN?3x3SKd"
# Below password works!
USER_PASS="qwer1234"
# 2: Create sample user and set password
USER="sampleuser"
ssh root@$HOST "useradd -m $USER -s /bin/bash"
ssh root@$HOST "echo $USER:$USER_PASS | chpasswd"
ssh root@$HOST 'cat /etc/passwd'
echo "test ssh login with $USER"
sshpass -p $USER_PASS ssh $USER@$HOSTThe above works fine when I use the 'qwer1234' password but does not work when I use the other one starting with 'Eb*'.
Are there any rules for linux passwords, characters etc.?
3 Reset to default