diff options
author | bfox <bfox> | 2001-09-13 21:08:41 +0000 |
---|---|---|
committer | bfox <bfox> | 2001-09-13 21:08:41 +0000 |
commit | 93d692c2402a0d7976a3be3e794c172399949146 (patch) | |
tree | dae5ba6f9f9eda743fb3d3ea4693adb96aa9b32e /textw | |
parent | 0b68d0ba7f4494bd3ef598650dd08e2f42186c93 (diff) | |
download | anaconda-93d692c2402a0d7976a3be3e794c172399949146.tar.gz anaconda-93d692c2402a0d7976a3be3e794c172399949146.tar.xz anaconda-93d692c2402a0d7976a3be3e794c172399949146.zip |
don't allow system users in the user add screen
Diffstat (limited to 'textw')
-rw-r--r-- | textw/userauth_text.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/textw/userauth_text.py b/textw/userauth_text.py index adc5f8b87..d91dd5027 100644 --- a/textw/userauth_text.py +++ b/textw/userauth_text.py @@ -75,6 +75,11 @@ class UsersWindow: if (not cancelText): cancelText = _("Cancel") + systemUsers = ['root', 'bin', 'daemon', 'adm', 'lp', 'sync', 'shutdown', 'halt', 'mail', + 'news', 'uucp', 'operator', 'games', 'gopher', 'ftp', 'nobody', 'nscd', + 'mailnull', 'rpm', 'ident', 'rpc', 'rpcuser', 'radvd', 'xfs', 'gdm', 'apache', + 'squid'] + userid = Entry (8, user["id"], scroll=0) currentid = user["id"] pass1 = Entry (10, user["password"], password = 1) @@ -148,6 +153,13 @@ class UsersWindow: buttons = [ TEXT_OK_BUTTON ], width = 50) continue + if userid.value() in systemUsers : + ButtonChoiceWindow(self.screen, _("User Exists"), + _("This system user is already configured. You don't " + "need to add this user here."), + buttons = [ TEXT_OK_BUTTON ], width = 50) + continue + if self.users.has_key (userid.value ()) and \ userid.value () != currentid: ButtonChoiceWindow(self.screen, _("User Exists"), |