diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2008-01-01 22:05:46 +0100 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2008-01-01 22:05:46 +0100 |
commit | 983c4e156990648cc228eb9c7325568a757c3013 (patch) | |
tree | 0093413e04b2466be858bdc5f4ac90906f4d5e46 /tests/test_nsscmds.sh | |
parent | 1d2e10c88250a07b71e456e3e3c7cccff2bdb520 (diff) |
check to see if nslcd is running and add test for a large group (100 members)
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@550 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'tests/test_nsscmds.sh')
-rwxr-xr-x | tests/test_nsscmds.sh | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/tests/test_nsscmds.sh b/tests/test_nsscmds.sh index a86c60b..30c1a86 100755 --- a/tests/test_nsscmds.sh +++ b/tests/test_nsscmds.sh @@ -2,7 +2,7 @@ # test.sh - simple test script to check output of name lookup commands # -# Copyright (C) 2007 Arthur de Jong +# Copyright (C) 2007, 2008 Arthur de Jong # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -24,7 +24,7 @@ # FIXME: update the above description and provide actual LDIF file # It's probably best to run this in an environment without nscd. -# note that nscd should not be running +# note that nscd should not be running (breaks services test) set -e @@ -38,8 +38,20 @@ ldapsearch -b "$base" -s base -x -H "$uri" > /dev/null 2>&1 || { echo "LDAP server $uri not available for $base" exit 77 } -# TODO: check if nslcd is running + +# basic check to see if nslcd is running +if ! [ -S /var/run/nslcd/socket ] || \ + ! [ -f /var/run/nslcd/nslcd.pid ] || \ + ! kill -s 0 `cat /var/run/nslcd/nslcd.pid` > /dev/null 2>&1 +then + echo "nslcd not running" + exit 77 +fi + # TODO: check if nscd is running + +# TODO: check if /etc/nsswitch.conf is correct + echo "using LDAP server $uri" # the total number of errors @@ -144,7 +156,15 @@ users:*:100:arthur,test EOM check "getent group | wc -l" << EOM -43 +44 +EOM + +check "getent group | grep ^largegroup" << EOM +largegroup:*:1005:akraskouskas,alat,ameisinger,bdevera,behrke,bmoldan,btempel,cjody,clouder,cmanno,dbye,dciviello,dfirpo,dgivliani,dgosser,emcquiddy,enastasi,fcunard,gcubbison,gdaub,gdreitzler,ghanauer,gpomerance,gsusoev,gtinnel,gvollrath,gzuhlke,hgalavis,hhaffey,hhydrick,hmachesky,hpaek,hpolk,hsweezer,htomlinson,hzagami,igurwell,ihashbarger,jyeater,kbradbury,khathway,kklavetter,lbuchtel,lgandee,lkhubba,lmauracher,lseehafer,lvittum,mblanchet,mbodley,mciaccia,mjuris,ndipanfilo,nfilipek,nfunchess,ngata,ngullett,nkraker,nriofrio,nroepke,nrybij,oclunes,oebrani,okveton,osaines,otrevor,pdossous,phaye,psowa,purquilla,rkoonz,rlatessa,rworkowski,sdebry,sgurski,showe,slaforge,tabdelal,testusr2,testusr3,tfalconeri,tpaa,uschweyen,utrezize,vchevalier,vdelnegro,vleyton,vmedici,vmigliori,vpender,vwaltmann,wbrettschneide,wselim,wvalcin,wworf,yautin,ykisak,zgingrich,znightingale,zwinterbottom +EOM + +check "getent group largegroup" << EOM +largegroup:*:1005:akraskouskas,alat,ameisinger,bdevera,behrke,bmoldan,btempel,cjody,clouder,cmanno,dbye,dciviello,dfirpo,dgivliani,dgosser,emcquiddy,enastasi,fcunard,gcubbison,gdaub,gdreitzler,ghanauer,gpomerance,gsusoev,gtinnel,gvollrath,gzuhlke,hgalavis,hhaffey,hhydrick,hmachesky,hpaek,hpolk,hsweezer,htomlinson,hzagami,igurwell,ihashbarger,jyeater,kbradbury,khathway,kklavetter,lbuchtel,lgandee,lkhubba,lmauracher,lseehafer,lvittum,mblanchet,mbodley,mciaccia,mjuris,ndipanfilo,nfilipek,nfunchess,ngata,ngullett,nkraker,nriofrio,nroepke,nrybij,oclunes,oebrani,okveton,osaines,otrevor,pdossous,phaye,psowa,purquilla,rkoonz,rlatessa,rworkowski,sdebry,sgurski,showe,slaforge,tabdelal,testusr2,testusr3,tfalconeri,tpaa,uschweyen,utrezize,vchevalier,vdelnegro,vleyton,vmedici,vmigliori,vpender,vwaltmann,wbrettschneide,wselim,wvalcin,wworf,yautin,ykisak,zgingrich,znightingale,zwinterbottom EOM ########################################################################### |