diff options
author | David Cantrell <dcantrell@redhat.com> | 2009-07-06 17:44:13 -1000 |
---|---|---|
committer | David Cantrell <dcantrell@redhat.com> | 2009-07-20 14:14:26 -1000 |
commit | ee889790b3f25d50f79784a6b318a12b002ce269 (patch) | |
tree | a29ae65758a88c914a9da86462628898f6bdedcb /users.py | |
parent | c066e28c572df081eea2ef23346c94f357b5545f (diff) | |
download | anaconda-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.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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) |