1 2# Import helper functions 3. $(atf_get_srcdir)/helper_functions.shin 4 5# Test add user 6atf_test_case user_add 7user_add_body() { 8 populate_etc_skel 9 10 atf_check -s exit:0 ${PW} useradd test 11 atf_check -s exit:0 -o match:"^test:.*" \ 12 grep "^test:.*" $HOME/master.passwd 13} 14 15# Test add user with option -N 16atf_test_case user_add_noupdate 17user_add_noupdate_body() { 18 populate_etc_skel 19 20 atf_check -s exit:0 -o match:"^test:.*" ${PW} useradd test -N 21 atf_check -s exit:1 -o empty grep "^test:.*" $HOME/master.passwd 22} 23 24# Test add user with comments 25atf_test_case user_add_comments 26user_add_comments_body() { 27 populate_etc_skel 28 29 atf_check -s exit:0 ${PW} useradd test -c 'Test User,work!,123,user@example.com' 30 atf_check -s exit:0 -o match:'^test:.*:Test User,work!,123,user@example.com:' \ 31 grep '^test:.*:Test User,work!,123,user@example.com:' $HOME/master.passwd 32} 33 34# Test add user with comments and option -N 35atf_test_case user_add_comments_noupdate 36user_add_comments_noupdate_body() { 37 populate_etc_skel 38 39 atf_check -s exit:0 -o match:"^test:.*:Test User,work,123,456:" \ 40 ${PW} useradd test -c "Test User,work,123,456" -N 41 atf_check -s exit:1 -o empty grep "^test:.*" $HOME/master.passwd 42} 43 44# Test add user with invalid comments 45atf_test_case user_add_comments_invalid 46user_add_comments_invalid_body() { 47 populate_etc_skel 48 49 atf_check -s exit:65 -e match:"invalid character" \ 50 ${PW} useradd test -c "Test User,work,123:456,456" 51 atf_check -s exit:1 -o empty \ 52 grep "^test:.*:Test User,work,123:456,456:" $HOME/master.passwd 53} 54 55# Test add user with invalid comments and option -N 56atf_test_case user_add_comments_invalid_noupdate 57user_add_comments_invalid_noupdate_body() { 58 populate_etc_skel 59 60 atf_check -s exit:65 -e match:"invalid character" \ 61 ${PW} useradd test -c "Test User,work,123:456,456" -N 62 atf_check -s exit:1 -o empty grep "^test:.*" $HOME/master.passwd 63} 64 65# Test add user with alternate homedir 66atf_test_case user_add_homedir 67user_add_homedir_body() { 68 populate_etc_skel 69 70 atf_check -s exit:0 ${PW} useradd test -d /foo/bar 71 atf_check -s exit:0 -o match:"^test:\*:.*::0:0:User &:/foo/bar:.*" \ 72 ${PW} usershow test 73} 74 75# Test add user with account expiration as an epoch date 76atf_test_case user_add_account_expiration_epoch 77user_add_account_expiration_epoch_body() { 78 populate_etc_skel 79 80 DATE=`date -j -v+1d "+%s"` 81 atf_check -s exit:0 ${PW} useradd test -e ${DATE} 82 atf_check -s exit:0 -o match:"^test:\*:.*::0:${DATE}:.*" \ 83 ${PW} usershow test 84} 85 86# Test add user with account expiration as a DD-MM-YYYY date 87atf_test_case user_add_account_expiration_date_numeric 88user_add_account_expiration_date_numeric_body() { 89 populate_etc_skel 90 91 DATE=`date -j -v+1d "+%d-%m-%Y"` 92 EPOCH=`date -j -f "%d-%m-%Y %H:%M:%S" "${DATE} 00:00:00" "+%s"` 93 atf_check -s exit:0 ${PW} useradd test -e ${DATE} 94 atf_check -s exit:0 -o match:"^test:\*:.*::0:${EPOCH}:User &:.*" \ 95 ${PW} usershow test 96} 97 98# Test add user with account expiration as a DD-MM-YYYY date 99atf_test_case user_add_account_expiration_date_month 100user_add_account_expiration_date_month_body() { 101 populate_etc_skel 102 103 DATE=`date -j -v+1d "+%d-%b-%Y"` 104 EPOCH=`date -j -f "%d-%b-%Y %H:%M:%S" "${DATE} 00:00:00" "+%s"` 105 atf_check -s exit:0 ${PW} useradd test -e ${DATE} 106 atf_check -s exit:0 -o match:"^test:\*:.*::0:${EPOCH}:User &:.*" \ 107 ${PW} usershow test 108} 109 110# Test add user with account expiration as a relative date 111atf_test_case user_add_account_expiration_date_relative 112user_add_account_expiration_date_relative_body() { 113 populate_etc_skel 114 115 EPOCH=`date -j -v+13m "+%s"` 116 BUF=`expr $EPOCH + 5` 117 atf_check -s exit:0 ${PW} useradd test -e +13o 118 TIME=`${PW} usershow test | awk -F ':' '{print $7}'` 119 [ ! -z $TIME -a $TIME -ge $EPOCH -a $TIME -lt $BUF ] || \ 120 atf_fail "Expiration time($TIME) was not within $EPOCH - $BUF seconds." 121} 122 123# Test add user with password expiration as an epoch date 124atf_test_case user_add_password_expiration_epoch 125user_add_password_expiration_epoch_body() { 126 populate_etc_skel 127 128 DATE=`date -j -v+1d "+%s"` 129 atf_check -s exit:0 ${PW} useradd test -p ${DATE} 130 atf_check -s exit:0 -o match:"^test:\*:.*::${DATE}:0:.*" \ 131 ${PW} usershow test 132} 133 134# Test add user with password expiration as a DD-MM-YYYY date 135atf_test_case user_add_password_expiration_date_numeric 136user_add_password_expiration_date_numeric_body() { 137 populate_etc_skel 138 139 DATE=`date -j -v+1d "+%d-%m-%Y"` 140 EPOCH=`date -j -f "%d-%m-%Y %H:%M:%S" "${DATE} 00:00:00" "+%s"` 141 atf_check -s exit:0 ${PW} useradd test -p ${DATE} 142 atf_check -s exit:0 -o match:"^test:\*:.*::${EPOCH}:0:User &:.*" \ 143 ${PW} usershow test 144} 145 146# Test add user with password expiration as a DD-MMM-YYYY date 147atf_test_case user_add_password_expiration_date_month 148user_add_password_expiration_date_month_body() { 149 populate_etc_skel 150 151 DATE=`date -j -v+1d "+%d-%b-%Y"` 152 EPOCH=`date -j -f "%d-%b-%Y %H:%M:%S" "${DATE} 00:00:00" "+%s"` 153 atf_check -s exit:0 ${PW} useradd test -p ${DATE} 154 atf_check -s exit:0 -o match:"^test:\*:.*::${EPOCH}:0:User &:.*" \ 155 ${PW} usershow test 156} 157 158# Test add user with password expiration as a relative date 159atf_test_case user_add_password_expiration_date_relative 160user_add_password_expiration_date_relative_body() { 161 populate_etc_skel 162 163 EPOCH=`date -j -v+13m "+%s"` 164 BUF=`expr $EPOCH + 5` 165 atf_check -s exit:0 ${PW} useradd test -p +13o 166 TIME=`${PW} usershow test | awk -F ':' '{print $6}'` 167 [ ! -z $TIME -a $TIME -ge $EPOCH -a $TIME -lt $BUF ] || \ 168 atf_fail "Expiration time($TIME) was not within $EPOCH - $BUF seconds." 169} 170 171atf_test_case user_add_name_too_long 172user_add_name_too_long_body() { 173 populate_etc_skel 174 atf_check -e match:"too long" -s exit:64 \ 175 ${PW} useradd name_very_vert_very_very_very_long 176} 177 178atf_test_case user_add_name_with_spaces 179user_add_name_with_spaces_body() { 180 populate_etc_skel 181 atf_check -s exit:65 -e match:"invalid character" \ 182 ${PW} useradd 'test user' 183 atf_check -s exit:1 -o empty grep "^test user:.*" $HOME/master.passwd 184 # Try again with -n which uses a slightly different code path. 185 atf_check -s exit:65 -e match:"invalid character" \ 186 ${PW} useradd -n 'test user' 187 atf_check -s exit:1 -o empty grep "^test user:.*" $HOME/master.passwd 188} 189 190atf_test_case user_add_name_with_spaces_and_gid_specified 191user_add_name_with_spaces_and_gid_specified_body() { 192 populate_etc_skel 193 gid=12345 194 user_name="test user" 195 # pw useradd should fail because of the space in the user 196 # name, not because the group doesn't exist. 197 atf_check -s exit:65 -e match:"invalid character" \ 198 ${PW} useradd "${user_name}" -g ${gid} 199 atf_check -s exit:1 -o empty grep "^${user_name}:.*" $HOME/master.passwd 200 # Try again with -n which uses a slightly different code path. 201 atf_check -s exit:65 -e match:"invalid character" \ 202 ${PW} useradd -n "${user_name}" -g ${gid} 203 atf_check -s exit:1 -o empty grep "^${user_name}:.*" $HOME/master.passwd 204 # Make sure the user isn't added even if the group exists 205 atf_check -s exit:0 ${PW} groupadd blafasel -g ${gid} 206 atf_check -s exit:65 -e match:"invalid character" \ 207 ${PW} useradd "${user_name}" -g ${gid} 208 atf_check -s exit:1 -o empty grep "^${user_name}:.*" $HOME/master.passwd 209 # Try again with the -n option. 210 atf_check -s exit:65 -e match:"invalid character" \ 211 ${PW} useradd -n "${user_name}" -g ${gid} 212 atf_check -s exit:1 -o empty grep "^${user_name}:.*" $HOME/master.passwd 213} 214 215atf_test_case user_add_expiration 216user_add_expiration_body() { 217 populate_etc_skel 218 219 atf_check -s exit:0 \ 220 ${PW} useradd foo -e 20-03-2037 221 atf_check -o inline:"foo:*:1001:1001::0:2121120000:User &:/home/foo:/bin/sh\n" \ 222 -s exit:0 grep "^foo" ${HOME}/master.passwd 223 atf_check -s exit:0 ${PW} userdel foo 224 atf_check -s exit:0 \ 225 ${PW} useradd foo -e 20-03-37 226 atf_check -o inline:"foo:*:1001:1001::0:2121120000:User &:/home/foo:/bin/sh\n" \ 227 -s exit:0 grep "^foo" ${HOME}/master.passwd 228 atf_check -s exit:0 ${PW} userdel foo 229 atf_check -s exit:0 \ 230 ${PW} useradd foo -e 20-Mar-2037 231 atf_check -o inline:"foo:*:1001:1001::0:2121120000:User &:/home/foo:/bin/sh\n" \ 232 -s exit:0 grep "^foo" ${HOME}/master.passwd 233 atf_check -s exit:0 ${PW} userdel foo 234 atf_check -e inline:"pw: Invalid date\n" -s exit:1 \ 235 ${PW} useradd foo -e 20-Foo-2037 236 atf_check -e inline:"pw: Invalid date\n" -s exit:1 \ 237 ${PW} useradd foo -e 20-13-2037 238 atf_check -s exit:0 ${PW} useradd foo -e "12:00 20-03-2037" 239 atf_check -s exit:0 ${PW} userdel foo 240 atf_check -e inline:"pw: Invalid date\n" -s exit:1 \ 241 ${PW} useradd foo -e "12 20-03-2037" 242 atf_check -s exit:0 ${PW} useradd foo -e "20-03-2037 12:00" 243 atf_check -s exit:0 ${PW} userdel foo 244} 245 246atf_test_case user_add_invalid_user_entry 247user_add_invalid_user_entry_body() { 248 touch ${HOME}/master.passwd 249 touch ${HOME}/group 250 251 pwd_mkdb -p -d ${HOME} ${HOME}/master.passwd || \ 252 atf_fail "generate passwd from master.passwd" 253 atf_check -s exit:0 ${PW} useradd foo 254 echo "foo1:*:1002" >> ${HOME}/master.passwd 255 atf_check -s exit:1 -e match:"Invalid user entry" ${PW} useradd foo2 256} 257 258atf_test_case user_add_invalid_group_entry 259user_add_invalid_group_entry_body() { 260 touch ${HOME}/master.passwd 261 touch ${HOME}/group 262 263 pwd_mkdb -p -d ${HOME} ${HOME}/master.passwd || \ 264 atf_fail "generate passwd from master.passwd" 265 atf_check -s exit:0 ${PW} useradd foo 266 echo 'foo1:*:1002' >> group 267 atf_check -s exit:1 -e match:"Invalid group entry" ${PW} useradd foo2 268} 269 270atf_test_case user_add_password_from_h 271user_add_password_from_h_body() { 272 populate_etc_skel 273 274 atf_check -s exit:0 ${PW} useradd foo -h 0 <<-EOF 275 $(echo mypassword) 276 EOF 277 passhash=`awk -F ':' '/^foo:/ {print $2}' $HOME/master.passwd` 278 atf_check -s exit:0 -o inline:$passhash \ 279 $(atf_get_srcdir)/crypt $passhash "mypassword" 280} 281 282atf_test_case user_add_R 283user_add_R_body() { 284 populate_root_etc_skel 285 286 atf_check -s exit:0 ${RPW} useradd foo 287 atf_check -s exit:0 ${RPW} useradd bar -m 288 test -d ${HOME}/home || atf_fail "Home parent directory not created" 289 test -d ${HOME}/home/bar || atf_fail "Directory not created" 290 atf_check -s exit:0 ${RPW} userdel bar 291 test -d ${HOME}/home/bar || atf_fail "Directory removed" 292 atf_check -s exit:0 ${RPW} useradd bar 293 atf_check -s exit:0 ${RPW} userdel bar -r 294 [ ! -d ${HOME}/home/bar ] || atf_fail "Directory not removed" 295} 296 297atf_test_case user_add_R_no_symlink 298user_add_R_no_symlink_body() { 299 populate_root_etc_skel 300 301 mkdir ${HOME}/usr 302 atf_check -s exit:0 ${RPW} useradd foo -m 303 [ ! -d ${HOME}/usr/home ] || atf_fail "/usr/home created" 304 test -d ${HOME}/home || atf_fail "/home directory not created" 305} 306 307atf_test_case user_add_R_intermed 308user_add_R_intermed_body() { 309 populate_root_etc_skel 310 311 atf_check -s exit:0 ${RPW} useradd foo -m -d /a/b/c/foo 312 test -d ${HOME}/a/b/c || atf_fail "intermediate directories not created" 313 test -d ${HOME}/a/b/c/foo || atf_fail "user directory not created" 314} 315 316atf_test_case user_add_dir 317user_add_dir_body() { 318 populate_root_etc_skel 319 320 atf_check -s exit:0 ${RPW} useradd foo -M 0705 -m 321 atf_check grep -q '^foo:' $HOME/etc/master.passwd 322 atf_check test -d ${HOME}/home/foo 323 atf_check -o save:ugid \ 324 awk -F: '$1 == "foo" { print $3, $4 }' \ 325 $HOME/etc/master.passwd 326 atf_check -o file:ugid \ 327 stat -f '%u %g' ${HOME}/home/foo 328 atf_check -o inline:"40705\n" \ 329 stat -f '%p' ${HOME}/home/foo 330} 331 332atf_test_case user_add_existing_dir 333user_add_existing_dir_body() { 334 populate_root_etc_skel 335 336 mkdir -p -m 0777 ${HOME}/home/foo 337 atf_check -o inline:"40777\n" \ 338 stat -f '%p' ${HOME}/home/foo 339 340 atf_check -s exit:0 ${RPW} useradd foo -M 0705 -m 341 atf_check grep -q '^foo:' $HOME/etc/master.passwd 342 atf_check test -d ${HOME}/home/foo 343 atf_check -o inline:"40705\n" \ 344 stat -f '%p' ${HOME}/home/foo 345} 346 347atf_test_case user_add_skel 348user_add_skel_body() { 349 populate_root_etc_skel 350 351 mkdir ${HOME}/skel 352 echo "a" > ${HOME}/skel/.a 353 echo "b" > ${HOME}/skel/b 354 mkdir ${HOME}/skel/c 355 mkdir ${HOME}/skel/c/d 356 mkdir ${HOME}/skel/dot.plop 357 echo "c" > ${HOME}/skel/c/d/dot.c 358 mkdir ${HOME}/home 359 ln -sf /nonexistent ${HOME}/skel/c/foo 360 atf_check -s exit:0 ${RPW} useradd foo -k /skel -m 361 test -d ${HOME}/home/foo || atf_fail "Directory not created" 362 test -f ${HOME}/home/foo/.a || atf_fail "File not created" 363 atf_check -o file:${HOME}/skel/.a -s exit:0 cat ${HOME}/home/foo/.a 364 atf_check -o file:${HOME}/skel/b -s exit:0 cat ${HOME}/home/foo/b 365 test -d ${HOME}/home/foo/c || atf_fail "Dotted directory in skel not copied" 366 test -d ${HOME}/home/foo/.plop || atf_fail "Directory in skell not created" 367 atf_check -o inline:"/nonexistent\n" -s ignore readlink -f ${HOME}/home/foo/c/foo 368 atf_check -o file:${HOME}/skel/c/d/dot.c -s exit:0 cat ${HOME}/home/foo/c/d/.c 369} 370 371atf_test_case user_add_uid0 372user_add_uid0_body() { 373 populate_etc_skel 374 atf_check -e inline:"pw: WARNING: new account \`foo' has a uid of 0 (superuser access!)\n" \ 375 -s exit:0 ${PW} useradd foo -u 0 -g 0 -d /root -s /bin/sh -c "Bourne-again Superuser" -o 376 atf_check \ 377 -o inline:"foo:*:0:0::0:0:Bourne-again Superuser:/root:/bin/sh\n" \ 378 -s exit:0 ${PW} usershow foo 379} 380 381atf_test_case user_add_uid_too_large 382user_add_uid_too_large_body() { 383 populate_etc_skel 384 atf_check -s exit:64 -e inline:"pw: Bad id '9999999999999': too large\n" \ 385 ${PW} useradd -n test1 -u 9999999999999 386} 387 388atf_test_case user_add_bad_shell 389user_add_bad_shell_body() { 390 populate_etc_skel 391 392 atf_check -s exit:0 ${PW} useradd foo -s sh 393 atf_check -s exit:78 -e ignore ${PW} useradd bar -s badshell 394} 395 396atf_test_case user_add_already_exists 397user_add_already_exists_body() { 398 populate_etc_skel 399 400 atf_check -s exit:0 ${PW} useradd foo 401 atf_check -s exit:65 \ 402 -e inline:"pw: login name \`foo' already exists\n" \ 403 ${PW} useradd foo 404} 405 406atf_test_case user_add_w_error 407user_add_w_error_body() { 408 populate_etc_skel 409 410 atf_check -s exit:1 -e match:"pw: Invalid value for default password" \ 411 ${PW} useradd foo -w invalid_value 412} 413 414atf_test_case user_add_w_no 415user_add_w_no_body() { 416 populate_etc_skel 417 418 atf_check -s exit:0 ${PW} useradd foo -w no 419 atf_check -s exit:0 -o match:"^foo:\*" grep "^foo:" $HOME/master.passwd 420} 421 422atf_test_case user_add_w_none 423user_add_w_none_body() { 424 populate_etc_skel 425 426 atf_check -s exit:0 ${PW} useradd foo -w none 427 atf_check -s exit:0 -o match:"^foo::" grep "^foo:" $HOME/master.passwd 428} 429 430atf_test_case user_add_w_random 431user_add_w_random_body() { 432 populate_etc_skel 433 434 password=`${PW} useradd foo -w random | cat` 435 passhash=`awk -F ':' '/^foo:/ {print $2}' $HOME/master.passwd` 436 atf_check -s exit:0 -o inline:$passhash \ 437 $(atf_get_srcdir)/crypt $passhash "$password" 438} 439 440atf_test_case user_add_w_yes 441user_add_w_yes_body() { 442 populate_etc_skel 443 password=`${PW} useradd foo -w random | cat` 444 passhash=`awk -F ':' '/^foo:/ {print $2}' $HOME/master.passwd` 445 atf_check -s exit:0 -o inline:$passhash \ 446 $(atf_get_srcdir)/crypt $passhash "$password" 447} 448 449atf_test_case user_add_with_pw_conf 450user_add_with_pw_conf_body() 451{ 452 populate_etc_skel 453 atf_check -s exit:0 \ 454 ${PW} useradd -D -C ${HOME}/pw.conf \ 455 -u 2000,32767 -i 2000,32767 456 atf_check -s exit:0 \ 457 -o inline:"minuid = 2000\nmaxuid = 32767\nmingid = 2000\nmaxgid = 32767\n" \ 458 grep "^m.*id =" ${HOME}/pw.conf 459 atf_check -s exit:0 \ 460 ${PW} useradd foo -C ${HOME}/pw.conf 461} 462 463atf_test_case user_add_defaultgroup 464user_add_defaultgroup_body() 465{ 466 populate_etc_skel 467 echo 'defaultgroup = "plop"' > ${HOME}/pw.conf 468 atf_check -s exit:0 \ 469 ${PW} groupadd plop -g 442 470 atf_check -s exit:0 \ 471 ${PW} useradd foo -C ${HOME}/pw.conf 472 atf_check -s exit:0 \ 473 -o inline:"foo:*:1001:442::0:0:User &:/home/foo:/bin/sh\n" \ 474 ${PW} usershow foo 475} 476 477atf_test_case user_add_conf_defaultpasswd 478user_add_conf_defaultpasswd_body() 479{ 480 populate_etc_skel 481 482 atf_check -s exit:0 ${PW} useradd -D -w no 483 atf_check -o inline:"defaultpasswd = \"no\"\n" \ 484 grep defaultpasswd ${HOME}/pw.conf 485 atf_check -s exit:0 ${PW} useradd -D -w none 486 atf_check -o inline:"defaultpasswd = \"none\"\n" \ 487 grep defaultpasswd ${HOME}/pw.conf 488 atf_check -s exit:0 ${PW} useradd -D -w random 489 atf_check -o inline:"defaultpasswd = \"random\"\n" \ 490 grep defaultpasswd ${HOME}/pw.conf 491 atf_check -s exit:0 ${PW} useradd -D -w yes 492 atf_check -o inline:"defaultpasswd = \"yes\"\n" \ 493 grep defaultpasswd ${HOME}/pw.conf 494} 495 496atf_test_case user_add_existing_login_group 497user_add_existing_login_group_body() 498{ 499 populate_etc_skel 500 501 atf_check -s exit:0 ${PW} groupadd testuser 502 atf_check -s exit:0 ${PW} useradd user1 -G testuser 503 atf_check -s exit:0 ${PW} useradd testuser 504 atf_check -o match:"1" \ 505 sh -c "grep testuser ${HOME}/group | wc -l" 506} 507 508atf_test_case user_add_already_in_group 509user_add_already_in_group_body() 510{ 511 populate_etc_skel 512 513 echo "testgroup:*:4242:testuser" >> ${HOME}/group 514 atf_check -s exit:0 ${PW} useradd testuser -G testgroup 515 atf_check -o not-match:"testuser,testuser" \ 516 grep testuser ${HOME}/group 517} 518 519atf_init_test_cases() { 520 atf_add_test_case user_add 521 atf_add_test_case user_add_noupdate 522 atf_add_test_case user_add_comments 523 atf_add_test_case user_add_comments_noupdate 524 atf_add_test_case user_add_comments_invalid 525 atf_add_test_case user_add_comments_invalid_noupdate 526 atf_add_test_case user_add_homedir 527 atf_add_test_case user_add_account_expiration_epoch 528 atf_add_test_case user_add_account_expiration_date_numeric 529 atf_add_test_case user_add_account_expiration_date_month 530 atf_add_test_case user_add_account_expiration_date_relative 531 atf_add_test_case user_add_password_expiration_epoch 532 atf_add_test_case user_add_password_expiration_date_numeric 533 atf_add_test_case user_add_password_expiration_date_month 534 atf_add_test_case user_add_password_expiration_date_relative 535 atf_add_test_case user_add_name_too_long 536 atf_add_test_case user_add_name_with_spaces 537 atf_add_test_case user_add_name_with_spaces_and_gid_specified 538 atf_add_test_case user_add_expiration 539 atf_add_test_case user_add_invalid_user_entry 540 atf_add_test_case user_add_invalid_group_entry 541 atf_add_test_case user_add_password_from_h 542 atf_add_test_case user_add_R 543 atf_add_test_case user_add_R_no_symlink 544 atf_add_test_case user_add_R_intermed 545 atf_add_test_case user_add_dir 546 atf_add_test_case user_add_existing_dir 547 atf_add_test_case user_add_skel 548 atf_add_test_case user_add_uid0 549 atf_add_test_case user_add_uid_too_large 550 atf_add_test_case user_add_bad_shell 551 atf_add_test_case user_add_already_exists 552 atf_add_test_case user_add_w_error 553 atf_add_test_case user_add_w_no 554 atf_add_test_case user_add_w_none 555 atf_add_test_case user_add_w_random 556 atf_add_test_case user_add_w_yes 557 atf_add_test_case user_add_with_pw_conf 558 atf_add_test_case user_add_defaultgroup 559 560 atf_add_test_case user_add_conf_defaultpasswd 561 atf_add_test_case user_add_existing_login_group 562 atf_add_test_case user_add_already_in_group 563} 564