Tool
This tool will check the status of the services that should be running and report accordingly.
#!/bin/bash
. /opt/novell/eDirectory/bin/ndspath > /dev/null 2>&1
export LDAPCONF=/etc/opt/novell/xad/openldap/ldap.conf
clear
echo -e "################################################################################################################################## \n"
echo -e "********************* DSfW Domain Controller Sanity Check ********************* \n"
echo -e "################################################################################################################################## \n"
LDAPCONF=/etc/opt/novell/xad/openldap/ldap.conf /usr/bin/ldapsearch -Y EXTERNAL -b '' -s base dn -LLL > /dev/null 2>&1
if [ $? == "0" ]
then
echo -e "1. LDAPI interface working \n"
else
echo -e "1. LDAPI interface *NOT* working \n"
exit 1;
fi
host=`/bin/hostname`
domain=`perl -e '$dom = \`/bin/dnsdomainname\`; print uc($dom);'`
provision --locate-dc $domain > /dev/null 2>&1
if [ $? == "0" ]
then
echo -e "2. Domain Controller is located and working \n"
else
echo -e "Domain Controller is *NOT* located \n"
exit 1;
fi
echo novell | /opt/novell/xad/bin/kinit Administrator@$domain > /dev/null 2>&1
if [ $? == "0" ]
then
echo -e "3. kinit working \n"
else
echo -e "3. kinit *NOT* working \n"
exit 1;
fi
SASL_PATH=/opt/novell/xad/lib/sasl2 /usr/bin/ldapsearch -H ldap://$host.$domain -Y GSSAPI -b '' -s base dn -LLL > /dev/null 2>&1
if [ $? == "0" ]
then
echo -e "4. LDAP SASL-GSSAPI bind working \n"
else
echo -e "4. LDAP SASL-GSSAPI bind *NOT* working \n"
exit 1;
fi
/usr/bin/rpcclient -k localhost -c dsroledominfo > /dev/null 2>&1
if [ $? == "0" ]
then
echo -e "5. rpcclient working \n"
else
echo -e "5. rpcclient *NOT* working \n"
exit 1;
fi
adminSID=`wbinfo -n administrator | cut -f 1 -d ' '`
if [ "$adminSID" == "" ]
then
echo -e "6. wbinfo: name to SID conversion *NOT* working \n"
exit 1;
else
echo -e "6. wbinfo: name to SID conversion working \n"
fi
adminuid=`wbinfo -S $adminSID`
if [ "$adminuid" == "" ]
then
echo -e "7. wbinfo: SID to uid conversion *NOT* working \n"
exit 1;
else
echo -e "7. wbinfo: SID to uid conversion working \n"
fi
wbinfo -s $adminSID > /dev/null 2>&1
if [ $? == "0" ]
then
echo -e "8. wbinfo: SID to name conversion working \n"
else
echo -e "8. wbinfo: SID to name conversion *NOT* working \n"
exit 1;
fi
tmp=`wbinfo -U $adminuid | grep S-1-5-21`
if [ "$tmp" == "" ]
then
echo -e "9. wbinfo: UID to name conversion *NOT* working \n"
exit 1;
else
echo -e "9. wbinfo: UID to name conversion working \n"
fi
smbclient -k -L $host.$domain > /dev/null 2>&1
if [ $? == "0" ]
then
echo -e "10. smbclient working \n"
else
echo -e "10. smbclient *NOT* working \n"
exit 1;
fi
echo -e "##################################################################################################################################"
#If any of these doesn't work run "dcmake nds_restart_services"
Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).
It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.
Related Articles
- INIT Script for Tivoli Storage Manager
- Restarting NDS on OES Linux without the Novell Client Warning Message on Desktops
- OES: Apply Patches Without New Kernel Patches Being Applied
- GroupWise 8 SP1 Linux - Script Checking Services w/auto restart/logging
- Status-Checking Script for DirXML Remote Loader
User Comments
- Be the first to comment! To leave a comment you need to Login or Register
- 4860 reads



0