From owner-freebsd-questions Tue Mar 6 1:17:44 2001 Delivered-To: freebsd-questions@freebsd.org Received: from gscamnlm03.wr.usgs.gov (gscamnlm03.wr.usgs.gov [130.118.4.113]) by hub.freebsd.org (Postfix) with ESMTP id A029B37B718; Tue, 6 Mar 2001 01:17:34 -0800 (PST) (envelope-from rsowders@usgs.gov) To: Tony Landells Cc: "T. William Wells" , freebsd-questions@FreeBSD.ORG, owner-freebsd-questions@FreeBSD.ORG, "Ted Mittelstaedt" Subject: Re: SUN TO BSD X-Mailer: Lotus Notes Release 5.0.3 March 21, 2000 Message-ID: From: "Robert L Sowders" Date: Tue, 6 Mar 2001 00:30:05 -0800 X-MIMETrack: Serialize by Router on gscamnlm03/SERVER/USGS/DOI(Release 5.0.3 |March 21, 2000) at 03/06/2001 01:17:34 AM, Serialize complete at 03/06/2001 01:17:34 AM MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Here is a link to a program that could be adapted to use a list of users, to generate accounts with default passwds. http://www.daemonnews.org/199908/enteruser-out.html I've also heard that "John the Ripper" will reassemble and reformat Linux and Solaris shadowed passwd files into unix 7 style files. Tony Landells Sent by: owner-freebsd-questions@FreeBSD.ORG 03/05/2001 11:10 PM To: "Ted Mittelstaedt" cc: "T. William Wells" , freebsd-questions@FreeBSD.ORG Subject: Re: SUN TO BSD [ Ted's comments about the very real problems with Solaris passwd/shadow file integrity omitted. ] I've come across this as well. We also ran into problems where people were in too many groups, and the group entries were too long (I haven't checked these on FreeBSD, but Solaris limits you to 16 groups with entries in /etc/group being limited to 512 bytes). In response, I wrote a PERL script which goes through all three files and does sensible things: 1. Deleting users from their primary group list in /etc/group (since they're in it automatically from the /etc/passwd entry). 2. Deleting users from /etc/passwd that don't have entries in /etc/shadow (and vice versa). 3. Deleting users from /etc/group that don't exist (possibly as a result of 2). 4. Reorders /etc/shadow to match /etc/passwd. 5. Reorders /etc/group so the groups are in numerically increasing order, and the users in each group list are in alphabetical order. The loop in the middle is "extensible" by someone comfortable with PERL so you could, for example, also delete everyone with a shell of /bin/false. I can't actually post it without permission though, because obviously it belongs to my employer. Cheers, Tony -- Tony Landells Senior Network Engineer Ph: +61 3 9677 9319 Australian Clearing Services Pty Ltd Fax: +61 3 9677 9355 Level 4, Rialto North Tower 525 Collins Street Melbourne VIC 3000 Australia To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message