| |
---|
| | |
---|
| | # Program Information |
---|
| | |
---|
| | PROGNAME = "mkapachepw" |
---|
| | RCSID = "$Id: mkapachepw.py,v 1.111 2005/04/05 21:44:36 root Exp $" |
---|
| | RCSID = "$Id: mkapachepw.py,v 1.112 2005/04/05 21:56:30 root Exp $" |
---|
| | VERSION = RCSID.split()[2] |
---|
| | |
---|
| | # Copyright Information |
---|
| | |
---|
| |
---|
| | os.umask(0377) |
---|
| | |
---|
| | # Group File |
---|
| | |
---|
| | grfile = open(GRFILE, "w") |
---|
| | try: |
---|
| | grfile = open(GRFILE, "w") |
---|
| | except: |
---|
| | ErrorMsg("Cannot Open/Create File '%s'." % GRFILE) |
---|
| | sys.exit(3) |
---|
| | |
---|
| | grfile.write(TIMESTAMP) |
---|
| | grfile.write(CMDLINE) |
---|
| | |
---|
| | # Write out groups if they are either protected or >= specified starting ID |
---|
| |
---|
| | grfile.write("%s: %s\n" % (gname, " ".join(groups[gname][1]))) |
---|
| | |
---|
| | grfile.close() |
---|
| | |
---|
| | |
---|
| | # Password File |
---|
| | |
---|
| | pwfile = open(PWFILE, "w") |
---|
| | try: |
---|
| | pwfile = open(PWFILE, "w") |
---|
| | except: |
---|
| | ErrorMsg("Cannot Open/Create File '%s'." % PWFILE) |
---|
| | sys.exit(3) |
---|
| | |
---|
| | pwfile.write(TIMESTAMP) |
---|
| | pwfile.write(CMDLINE) |
---|
| | |
---|
| | # Write out users if they are either protected or >= specified starting ID |
---|
| |
---|
| | |