summaryrefslogtreecommitdiffstats
path: root/users.py
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2009-07-06 17:44:13 -1000
committerDavid Cantrell <dcantrell@redhat.com>2009-07-20 14:14:26 -1000
commitee889790b3f25d50f79784a6b318a12b002ce269 (patch)
treea29ae65758a88c914a9da86462628898f6bdedcb /users.py
parentc066e28c572df081eea2ef23346c94f357b5545f (diff)
downloadanaconda-ee889790b3f25d50f79784a6b318a12b002ce269.tar.gz
anaconda-ee889790b3f25d50f79784a6b318a12b002ce269.tar.xz
anaconda-ee889790b3f25d50f79784a6b318a12b002ce269.zip
Set GECOS field for new user accounts specific in ks files
Honor the --gecos argument to the user command in kickstart files.
Diffstat (limited to 'users.py')
-rw-r--r--users.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/users.py b/users.py
index 6534a0003..57e68fa6f 100644
--- a/users.py
+++ b/users.py
@@ -121,7 +121,7 @@ class Users:
def createUser (self, name=None, password=None, isCrypted=False, groups=[],
homedir=None, shell=None, uid=None, algo=None, lock=False,
- root="/mnt/sysimage"):
+ root="/mnt/sysimage", gecos=None):
childpid = os.fork()
if not childpid:
@@ -153,6 +153,9 @@ class Users:
if uid >= 0:
userEnt.set(libuser.UIDNUMBER, uid)
+ if gecos:
+ userEnt.set(libuser.GECOS, gecos)
+
self.admin.addUser(userEnt)
self.admin.addGroup(groupEnt)