doing some spring cleaning....


 
Thread Tools Search this Thread
Operating Systems AIX doing some spring cleaning....
# 1  
Old 06-14-2001
doing some spring cleaning....

Code:
USERS="me you jim joe sue"
for user in ${USERS}; do
rmuser -p $user
usrdir=`cat /etc/passwd|grep $user|awk -F":" '{ print $6 }'`
rm -fr `cat /etc/passwd|grep $user|awk -F":" '{ print $6 }'`
echo Deleting: $user '\t' REMOVING: $usrdir
done

This is for AIX ONLY!!! but easily ported to solaris.

just deletes the list of people in the USERS variable. i am sure everyone has something like this. so i would just post it for those who dont.

do you have anything you wanted to post that helps in your spring system cleaning?

Last edited by Optimus_P; 06-14-2001 at 04:48 PM..
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question
USERS(1)							   User Commands							  USERS(1)

NAME
users - print the user names of users currently logged in to the current host SYNOPSIS
users [OPTION]... [ FILE ] DESCRIPTION
Output who is currently logged in according to FILE. If FILE is not specified, use /var/run/utmp. /var/log/wtmp as FILE is common. --help display this help and exit --version output version information and exit AUTHOR
Written by Joseph Arceneaux and David MacKenzie. REPORTING BUGS
Report bugs to <bug-coreutils@gnu.org>. COPYRIGHT
Copyright (C) 2006 Free Software Foundation, Inc. This is free software. You may redistribute copies of it under the terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
The full documentation for users is maintained as a Texinfo manual. If the info and users programs are properly installed at your site, the command info users should give you access to the complete manual. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+--------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+--------------------+ |Availability | SUNWgnu-coreutils | +--------------------+--------------------+ |Interface Stability | Uncommitted | +--------------------+--------------------+ NOTES
Source for GNU coreutils is available on http://opensolaris.org. users 6.7 December 2006 USERS(1)