Missing IP’s in WHM solved

UPDATE: 1/4/10
After restoring a site in WHM, a client stated his IP addresses in WHM Main >> Account Information >> List Accounts page. In checking, all that was seen was the work ‘Unknown’ in the IP section of the page. This is the 3rd time I have come across this error and have documented the repair walk-through here.

cat /etc/passwd | sed -e 's/:x:[0-9]\{3\}/\:x/' -e 's/::.*/:/' > /root/pwd_to_grp
mv /root/pwd_to_grp group
cat /etc/passwd | sed -e 's/:x:[0-9]\+/\:x/' -e 's/::.*/:/' > /root/group
diff group group.bak
for each in `cat group | sed -e '/[a-Z]$/!d'`; do username=${each%%:*}; sed -e "s/^$username:.*/$each/" group.bak ;done
diff group /etc/group
diff group /etc/group |grep username
diff group /etc/passwd |grep username
ls /etc/ |grep passwd
ls /etc/ |grep group
echo -n > /etc/group
cp group /etc/group
diff group /etc/passwd |grep username
/scripts/rebuildhttpdconf
/scripts/ensure_vhost_includes --all-users
/scripts/rebuildcpusers
/scripts/updateuserdomains
/scripts/rebuildhttpdconf
/etc/init.d/httpd restart

g33kadmin

I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.