summaryrefslogtreecommitdiffstats
path: root/users.py
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2008-03-13 15:22:21 -0400
committerChris Lumens <clumens@redhat.com>2008-03-13 15:24:59 -0400
commit169b3a293dc5cbabff289e3fc719a2ffbadbc95c (patch)
tree41bebab38cb3811683c50bf5a840e5ad8c9cb7fb /users.py
parent34a27257e96e99559c4b3c1571368745dc5bcf50 (diff)
downloadanaconda-169b3a293dc5cbabff289e3fc719a2ffbadbc95c.tar.gz
anaconda-169b3a293dc5cbabff289e3fc719a2ffbadbc95c.tar.xz
anaconda-169b3a293dc5cbabff289e3fc719a2ffbadbc95c.zip
Fix creating new users in kickstart.
Diffstat (limited to 'users.py')
-rw-r--r--users.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/users.py b/users.py
index 856012db1..3f5d73538 100644
--- a/users.py
+++ b/users.py
@@ -80,10 +80,6 @@ class Users:
def __init__ (self):
self.admin = libuser.admin()
- def reset(self):
- os.unsetenv("LIBUSER_CONF")
- self.admin = libuser.admin()
-
def createUser (self, name=None, password=None, isCrypted=False, groups=[],
homedir=None, shell=None, uid=None, algo=None, lock=False,
root="/mnt/sysimage"):
@@ -92,6 +88,9 @@ class Users:
if not childpid:
os.chroot(root)
+ del(os.environ["LIBUSER_CONF"])
+ self.admin = libuser.admin()
+
try:
if self.admin.lookupUserByName(name):
os._exit(1)