| #!/bin/bash |
| # Author: Iain Douglas <centos@1n6.org.uk> |
| |
| t_Log "Running $0 - Testing newusers" |
| grep -q "^xyssy" /etc/passwd && { t_Log "FAIL: user xyssy alredy exists"; exit $FAIL; } |
| newusers <<EOF |
| xyssy:plughcycle:990991:990991:xyssy comment:/home/xyssy:/bin/bash |
| EOF |
| t_CheckExitStatus $? |
| echo "Check password file updated" |
| grep -q "^xyssy" /etc/passwd |
| t_CheckExitStatus $? |