On Tue, 11 Dec 2007 19:46:33 +0100, <[EMAIL PROTECTED]> wrote:
>
> The following issue has been SUBMITTED.
> ======================================================================
> http://bugs.gobolinux.org/view.php?id=221
>Summary: Installer disallowing empty SuperUser password
> Description:
> Right now you can not set "empty" passwords.
>
> The problem is that the installer decides this for you, not you as user.
> (Admittedly this is a super-trivial thing but at least a dev can explain
> why it should be this or that way. I explain my point of view on it soon.)
>
> I propose the:
> "may not set empty passwords"
> during Installer be changed to a warning instead like this:
> "Warning - it is not recommended to have an empty password for the
> superuser account. If you insist to have this though, just continue."
>
> or similar in wording.
I'm not sure about what others think of this, but I agree that allowing an
empty superuser password can be a valid option in some cases. I've attached
my proposal for a solution for this issue. It locks the superuser account,
like how it's done in ubuntu, if no password is given. It also notices the
user about this and warns about not adding a user with superuser privileges
if the superuser account is locked. I don't know if it should be possible
to continue if one has a locked superuser account and hasn't added a user
with superuser privilages, but I choose this because I remember the
discussion about having to add users even if one didn't want to.
--
/Jonas
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Index: bin/GoboLinuxInstaller
===================================================================
RCS file: /sources/goboscripts/tools/Installer/bin/GoboLinuxInstaller,v
retrieving revision 1.42
diff -u -r1.42 GoboLinuxInstaller
--- bin/GoboLinuxInstaller 12 Dec 2007 17:32:26 -0000 1.42
+++ bin/GoboLinuxInstaller 12 Dec 2007 22:27:20 -0000
@@ -685,11 +685,17 @@
installer.setValue('SuperUserPassword', '')
else :
if installer.getValue('SuperUserPassword') == '' :
- x = installer.showMessageBox(tr('Password is not allowed to be empty.'), ['Ok'])
+ answer = installer.showMessageBox(tr('Superuser password is emtpy. This account will be locked.'), ['Ok','Cancel','Info'])
+ if answer == 'Ok' :
+ return 1
+ elif answer == 'Info' :
+ installer.showMessageBox(tr('The superuser account will be locked from direct login. Instead a normal user account with superuser privileges together with the command \'sudo\' to administer the system. You can enable the superuser account later by setting a password for it.'),['Ok'])
+ else :
+ return 0
else :
return 1
-superUserScreen.addLineEdit('SuperUserLogin',tr('Login:'),'root', tr('Select the account name for the superuser.') )
+superUserScreen.addLineEdit('SuperUserLogin',tr('Login:'),'gobo', tr('Select the account name for the superuser.') )
superUserScreen.addPassword('SuperUserPassword', tr('Password:'), '', tr('Enter the password for the superuser.') )
superUserScreen.addPassword('SuperUserPasswordRetyped', tr('Retype password:'), '', tr('Enter the same password as above, to verify for typing mistakes.') )
superUserScreen.onValidate(checkSuperUserPasswords)
@@ -746,6 +752,21 @@
def checkAddedUsers() :
userslist,selection = installer.getValue('Users')
+ if installer.getValue('SuperUserPassword') == '' :
+ lockedsuperuserok = 0
+ for user in userslist :
+ if addedUsers[user]['NewUserEnableSudo'] :
+ lockedsuperuserok = 1
+ break
+ if not lockedsuperuserok :
+ answer = installer.showMessageBox(tr('You should add at least one user with superuser privileges or go back and set a password for the superuser. Are you really sure you want to continue?'), ['Yes','No','Info'])
+ if answer == 'Yes' :
+ return 1
+ elif answer == 'Info' :
+ installer.showMessageBox(tr('To be able to administer your system you need an unlocked superuser account (by setting a password for the superuser) or a user with superuser privileges.'),['Ok'])
+ return 0
+ else :
+ return 0
if len(userslist) == 0 :
answer = installer.showMessageBox(tr('No normal users are added. Do you want to continue anyway?'), ['Yes','No','Info'])
if answer == 'Yes' :
@@ -1139,9 +1160,12 @@
goboLineList[0] = goboLogin
goboOldPassword = goboLineList[1]
- uncriptedNewPassword = installer.getValue('SuperUserPassword')
- salt = goboOldPassword[:2]
- criptedNewPassword = crypt.crypt(uncriptedNewPassword, salt)
+ if not installer.getValue('SuperUserPassword') :
+ criptedNewPassword = '!'
+ else :
+ uncriptedNewPassword = installer.getValue('SuperUserPassword')
+ salt = goboOldPassword[:2]
+ criptedNewPassword = crypt.crypt(uncriptedNewPassword, salt)
goboLineList[1] = criptedNewPassword
goboLine = string.join(goboLineList,':')
_______________________________________________
gobolinux-devel mailing list
[email protected]
http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel