Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

is there an account manager for NIS? 1

Status
Not open for further replies.

InigoMontoya

IS-IT--Management
Jun 18, 2003
51
US
I can add users to the NIS environment quite easily. But when it's time remove users I have to go through a lengthy process of removing entries in different NIS map files. Is there a tool similar to the admintool...or even a text based menu driven tool that manages user accounts on NIS for Solaris?
 
Hi,

I do not know that kind of tool. What about a script like below.
-----------------
#!/bin/sh
user=$1
if [ "`/usr/ucb/whoami`" != "root" ]; then
echo "Only root can run this script"
exit 1
fi

if [ "$user" = "" ]; then
echo " Give a user name:"
exit 1
fi

/usr/sbin/userdel $user
[ ! $? = 0 ] && exit 1

rm -rf /usr/home/$user

rm -f /var/mail/$user

cd /var/yp; make
-------------------
 
umm ... SMC (system management console) will do it if you have Solstice Admin suite installed.

as it happens i prefer to do it at the prompt :)

crasho2001 is right in some ways (although his script won't do NIS) in that you could create a script to do it all for you.
 
I ended up writing my own menu driven (select) script to manage the NIS accounts.
 
can you post it?

it might help others.

Jon
 
It's too big to post on here. It's functional but big and clunky. I didn't really spend the time to streamline but I'm working on that. Also I'm only a beginner in scripting. Regardless...I'll be more than happy to email to anyone that wants it. Once I have it thinned out I'll post it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top