summaryrefslogtreecommitdiffstats
path: root/textw/userauth_text.py
diff options
context:
space:
mode:
authorbfox <bfox>2001-09-13 21:08:41 +0000
committerbfox <bfox>2001-09-13 21:08:41 +0000
commit93d692c2402a0d7976a3be3e794c172399949146 (patch)
treedae5ba6f9f9eda743fb3d3ea4693adb96aa9b32e /textw/userauth_text.py
parent0b68d0ba7f4494bd3ef598650dd08e2f42186c93 (diff)
downloadanaconda-93d692c2402a0d7976a3be3e794c172399949146.tar.gz
anaconda-93d692c2402a0d7976a3be3e794c172399949146.tar.xz
anaconda-93d692c2402a0d7976a3be3e794c172399949146.zip
don't allow system users in the user add screen
Diffstat (limited to 'textw/userauth_text.py')
-rw-r--r--textw/userauth_text.py12
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"),