Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to increase the security of a remaster distro meant to be ran live and used online. To avoid tempting the user into:

  • not changing their password
  • not creating a new password, or
  • using an auto login user

I'm changing the password at the gdm and creating a popup window that gives the passwords to the user to sign in.

At this point in time, this is what is what is going on:

  • passwords sometimes successfully changed.
  • some user passwords are changed, others not
  • old passwords are never left, so if the passwords are not changed successfully, then there is a lock out, reboot needed

What can I do to the start up script to ensure the passwords are definitely changed?

password python code call, for the user manager:

os.system("usermod -p `mkpasswd -H md5 " + managerPassword + "` manager")

startup script:

# create new passwords at login

task
# the following "start on" from gdm.conf, has helped, but not solved
start on (filesystem
          and started dbus
          and (drm-device-added card0 PRIMARY_DEVICE_FOR_DISPLAY=1
               or stopped udevtrigger)) or initpasswd

script
    python /initpasswd/initpasswd-sleep.py # a little sleep has helped, not solved
    python /initpasswd/initpasswd.py # password reset script
    echo "" > /initpasswd/initpasswd.py # so it resets only once at gdm per boot
end script
share|improve this question

1 Answer 1

You could skip most of this, and simply use password aging to set up a passwordless login that requires a change of password at first login. See man chage, and this explanation of password aging. /usr/bin/chage is in the passwd package on my Ubuntu 11.10. This is another good explanation.

share|improve this answer
    
This is a great answer. But, I want to give the users a choice. I'm setting it for auto-login, at which point they log in and I use an upstart script to stop all auto logins. So, they can either use the computer with a difficult password already set and not have to type one in or write it down. If they have to sign in and out of accounts, then they will need to write it down. I'm creating a convenience as well as security and if I make them put in a password, this would be annoying to them when they don't need it. –  bambuntu Feb 29 '12 at 3:05
    
I found the problem. Not allow characters in the pass word that could be used as wildcards. Otherwise this works for my purpose. –  bambuntu Mar 21 '12 at 21:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.