#!/usr/bin/python

import libuser
import os

print "--------- Initializing."
admin = libuser.Admin()

print "--------- Lookup."
user = admin.lookupUserByName("ldap")
if(not user):
	os.exit(0)

print "--------- Setting new name."
user[libuser.LU_USERNAME] = 'bubba'
print user[libuser.LU_USERNAME]

print "--------- Modifying user."
admin.modifyUser(user)
