From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96595955315432.tru64-unix-managers.marc@archive.invalid> From: "Paul N. Youngblood" Date: Fri, 11 Aug 2000 02:17:03 +0000 To: tru64-unix-managers Subject: SUMMARY Suggestions for removing /etc/passwd entries X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96595955315432 Hello System Admins, Please see my original post at the end of this message. I've received a great deal of very useful information on this question. Many thanks to all of you who took the time to help me out! I've listed you further on in this summary. I know this summary is late and I apologize. This is SUMMARY #1 and will be very brief. In about two weeks when things are more settled, I'll submit a more in-depth SUMMARY #2. I completely forgot about the need to run mkpasswd AFTER one operates on the /etc/passwd file without using vipw. The mkpasswd is necessary to rebuild the hashed database comprised of /etc/passwd.pag and /etc/passwd.dir. First, of course, I need to backup the system. I understand that it is possible to do the rest of this in multi-user mode with a few precautions. However, judging from your responses, I believe it will be easier in my particular situation to run the rest in single-user mode. Run a script which uses sed or awk on /etc/passwd to remove all unwanted users. Then run the mkpasswd command. And then, while still in single-user mode, I can do either one of the following: (1) Run another script which uses "edauth -r" to remove the same users from the edauth database. (2) Use the "convuser -d" command which automatically removes all users from the edauth database that do not appear in the /etc/passwd file. More details later in SUMMARY #2. What a great list! Thanks to all these kind people: Frank Wortner John P Speno Alex Nord Robert Carsey Jan Bacher Dennis Breeden Richard Jackson Matt Moore "Degerness, Mandell ISTA:EX" Amy Bobby Thomas M. Payerle Nikola Milutinovic Richard Rogers Robert Mulley Ann Majeske USG Tim Mooney ----------original posting----------------------------- Date: Thu, 27 Jul 2000 15:00:07 -0500 (CDT) From: Paul N. Youngblood To: tru64-unix-managers Subject: Suggestions for removing /etc/passwd entries Hello System Admins, I'm running Tru64 v4.0d and Enhanced (C2) Security. It's time to clean up my user base (remove old, inactive accounts). My /etc/passwd file has over 9000 entries. I want to delete over 5000 specific users from that file using some sort of automation. I don't want to RETIRE the users, I actually want to remove them from /etc/passwd. I know how to do the appropriate "edauth -r USERNAME" stuff, etc, but I could really use some suggestions on a "safe" way to operate on this password file. What do you think about doing the following (Would this work and be reasonably safe)? ... Boot to single-user mode, and run a script which makes use of something like sed to strip out the "bad" guys from /etc/passwd. Will doing this without vipw cause problems? I'm looking for a way other than using vipw and deleting all 5000+ accounts manually. I'll certainly SUMMARIZE. Thanks for you attention. Paul Youngblood