summaryrefslogtreecommitdiffstats
path: root/textw
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2000-02-04 20:49:59 +0000
committerMatt Wilson <msw@redhat.com>2000-02-04 20:49:59 +0000
commit53a49617168c79c66636cf22da6f45454a5d2b4a (patch)
tree16920d49aafaec4c70e34871af70de7cf7ec1be2 /textw
parentf96109bf0b831fe2824ea37aca011fe68262e4d7 (diff)
downloadanaconda-53a49617168c79c66636cf22da6f45454a5d2b4a.tar.gz
anaconda-53a49617168c79c66636cf22da6f45454a5d2b4a.tar.xz
anaconda-53a49617168c79c66636cf22da6f45454a5d2b4a.zip
check useraccount
Diffstat (limited to 'textw')
-rw-r--r--textw/userauth.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/textw/userauth.py b/textw/userauth.py
index 769fd445b..daf962df4 100644
--- a/textw/userauth.py
+++ b/textw/userauth.py
@@ -2,7 +2,8 @@
from snack import *
from textw.constants import *
from text import _
-
+import iutil
+
class RootPasswordWindow:
def __call__ (self, screen, todo):
toplevel = GridForm (screen, _("Root Password"), 1, 3)
@@ -86,6 +87,14 @@ class UsersWindow:
not len(userid.value()) and not len(fullname.value()):
return INSTALL_OK
+ if (not iutil.validUser(userid.value())):
+ ButtonChoiceWindow(self.screen, _("Bad User ID"),
+ _("User IDs must be less than 8 "
+ "characters and contain only characters "
+ "A-Z, a-z, and 0-9."),
+ buttons = [ _("OK") ], width = 50)
+ continue
+
if not userid.value ():
ButtonChoiceWindow(self.screen, _("Missing User ID"),
_("You must provide a user ID"),