summaryrefslogtreecommitdiffstats
path: root/iw/account_gui.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 /iw/account_gui.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 'iw/account_gui.py')
-rw-r--r--iw/account_gui.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/iw/account_gui.py b/iw/account_gui.py
index 22c5d5a8a..7c41f936f 100644
--- a/iw/account_gui.py
+++ b/iw/account_gui.py
@@ -62,9 +62,14 @@ class AccountWindow (InstallWindow):
password1 = self.userPass1.get_text()
password2 = self.userPass2.get_text()
+ 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']
+
if (password1 and password1 == password2 and
self.userAccountMatch.search(accountName) and
- len(accountName) <= 8 and len(password1) > 5) and accountName != "root":
+ len(accountName) <= 8 and len(password1) > 5) and accountName != "root" and accountName not in systemUsers:
self.userPwLabel.set_text(_("User password accepted."))
self.win.set_sensitive(0, TRUE)
else:
@@ -73,6 +78,8 @@ class AccountWindow (InstallWindow):
self.userPwLabel.set_text("")
elif accountName == "root":
self.userPwLabel.set_text (_("Root account can not be added here."))
+ elif accountName in systemUsers:
+ self.userPwLabel.set_text (_("System accounts can not be added here."))
elif not password1 and not password2:
self.userPwLabel.set_text (_("Please enter user password."))
elif len (password1) < 6: