[rhinstaller/anaconda/pulls/184 master] User operation kickstart tests.

bcl installerbot-noreply at redhat.com
Fri Jul 10 21:51:29 UTC 2015


> @@ -0,0 +1,80 @@
> +url --url="http://dl.fedoraproject.org/pub/fedora/linux/development/$releasever/$basearch/os/"
> +
> +install
> +
> +network --bootproto=dhcp
> +
> +bootloader --timeout=1
> +zerombr
> +
> +clearpart --all
> +autopart --type=lvm
> +
> +keyboard us
> +lang en
> +timezone America/New_York
> +
> +rootpw qweqwe
> +
> +## TEST CREATE USER
> +# Create specific user group
> +group --name=kosygroup --gid=5001
> +
> +# Create specific user
> +user --name=kosieh --gecos="Kosieh Barter" --homedir=/home/kbarter --password="$6$QsJCB9E6geIjWNvn$UZLEtnHYgKmFgrPo0fY1qNBc/aRi9b01f19w9mpdFm9.MPblckUuFYvpRLSzeYeR/6lO/2uY4WtjhbryC0k2L/" --iscrypted --shell=/bin/bash --uid=4001 --gid=5001
> +
> +shutdown
> +
> +%packages
> +%end
> +
> +%post
> +
> +## TEST CREATE USER CHECK
> +# Check group
> +cat /etc/group | grep 5001
> +if [[ $? -ne 0 ]]; then
> +    echo "Group failed to create." >> /root/RESULT
> +fi
> +
> +# Check find username
> +cat /etc/passwd | grep kosieh
> +if [[ $? -ne 0 ]]; then
> +    echo "User is not present in system." >> /root/RESULT
> +fi
> +
> +# Check GEDOS: real name
> +cat /etc/passwd | grep kosieh | grep "Kosieh Barter"
> +if [[ $? -ne 0 ]]; then
> +    echo "User is present, but not all details: REAL NAME (GEDOS)" >> /root/RESULT
> +fi
> +
> +# Check if the user has his/her bash
> +cat /etc/passwd | grep kosieh | grep "/bin/bash"
> +if [[ $? -ne 0 ]]; then
> +    echo "User is present, but /bin/bash is not set" >> /root/RESULT
> +fi
> +

Add a check to make sure the home directory is in /etc/passwd too.


-- 
To view this pull request on github, visit https://github.com/rhinstaller/anaconda/pull/184#discussion_r34399590


More information about the anaconda-patches mailing list