commit
f37a9452d5
@ -1,57 +0,0 @@ |
||||
#!/usr/bin/python |
||||
""" |
||||
ceoquery - a script to lookup member and account information |
||||
""" |
||||
import os, sys |
||||
from ceo import members, terms |
||||
|
||||
try: |
||||
members.connect() |
||||
except Exception, e: |
||||
print "ceoquery: %s" % e |
||||
sys.exit(1) |
||||
|
||||
def usage(): |
||||
print "Usage: ceoquery memberlist|termusers" |
||||
|
||||
if len(sys.argv) < 2: |
||||
usage() |
||||
|
||||
elif sys.argv[1] == 'memberlist': |
||||
|
||||
current_term = terms.current() |
||||
members = members.list_term(current_term) |
||||
for member in members.values(): |
||||
if 'program' in member: |
||||
program = member['program'][0] |
||||
else: |
||||
program = '' |
||||
print "%s|%s|%s" % (member['cn'][0], program, member['uid'][0]) |
||||
|
||||
elif sys.argv[1] == 'allmembers': |
||||
|
||||
pass |
||||
|
||||
elif sys.argv[1] == 'booklist': |
||||
|
||||
pass |
||||
|
||||
elif sys.argv[1] == 'allusers': |
||||
|
||||
pass |
||||
|
||||
elif sys.argv[1] == 'termusers': |
||||
|
||||
if len(sys.argv) > 2: |
||||
term = sys.argv[2] |
||||
else: |
||||
term = terms.current() |
||||
|
||||
members = members.list_term(term) |
||||
for member in members: |
||||
print member |
||||
|
||||
else: |
||||
|
||||
usage() |
||||
|
@ -0,0 +1 @@ |
||||
docs/*.[0-9] |
@ -1,7 +0,0 @@ |
||||
TODO: |
||||
|
||||
* Python bindings for libkadm5 |
||||
* Python bindings for quota? |
||||
* Logging via syslog |
||||
* Try to recover and roll-back on error during account creation |
||||
* Write manpages |
@ -0,0 +1,13 @@ |
||||
.TH ADDCLUB 1 "December 16, 2007" |
||||
.SH NAME |
||||
addclub \- add club accounts to the directory |
||||
.SH SYNOPSIS |
||||
.B addclub |
||||
userid clubname |
||||
.SH DESCRIPTION |
||||
.B Addclub |
||||
creates an LDAP entry and home directory for new club accounts. |
||||
.SH SEE ALSO |
||||
.BR ceo (1). |
||||
.SH AUTHOR |
||||
Michael Spang <mspang@csclub.uwaterloo.ca> |
@ -0,0 +1,16 @@ |
||||
.TH ADDMEMBER 1 "December 16, 2007" |
||||
.SH NAME |
||||
addmember \- add club members to the directory |
||||
.SH SYNOPSIS |
||||
.B addmember |
||||
userid name [ program ] |
||||
.SH DESCRIPTION |
||||
.B Addmember |
||||
performs all tasks necessary for creation of a new CSC member. It creates |
||||
an LDAP entry, Kerberos principal, and home directory for the new member. |
||||
It does NOT register the new member for any terms. This must be done after |
||||
the member is created. |
||||
.SH SEE ALSO |
||||
.BR ceo (1). |
||||
.SH AUTHOR |
||||
Michael Spang <mspang@csclub.uwaterloo.ca> |
@ -0,0 +1,17 @@ |
||||
.TH CEO 1 "December 16, 2007" |
||||
.SH NAME |
||||
ceo \- CSC Electronic Office |
||||
.SH DESCRIPTION |
||||
CSC Electronic Office is used to manage membership registration and |
||||
user accounts for the Computer Science Club. It has a graphical |
||||
user interface, started by typing |
||||
.B ceo |
||||
with no arguments. |
||||
.PP |
||||
.SH SEE ALSO |
||||
.BR addmember (1), |
||||
.BR addclub (1). |
||||
.SH AUTHORS |
||||
Michael Spang <mspang@csclub.uwaterloo.ca> |
||||
.br |
||||
David Bartley <dtbartle@csclub.uwaterloo.ca> |
Loading…
Reference in new issue