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
GNU coreutils online help: <http://www.gnu.org/software/coreutils/> Report users translation bugs to <http://translationproject.org/team/> COPYRIGHT
Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
getent(1), who(1) Full documentation at: <http://www.gnu.org/software/coreutils/users> or available locally via: info '(coreutils) users invocation' GNU coreutils 8.28 January 2018 USERS(1)