0

Humor me for a moment because I'm aware that this is a terrible idea.
I'm trying to devise a way to reset a user's password each time the computer is rebooted.

So far, I've tried the following to no avail:

  • Make a script to run usermod --password CRYPTEDPASS username
  • Modify the root crontab to run that script @reboot

The other @reboot actions take place, but attempting to reset the user's password doesn't seem to work. When I run the reset script manually, it works just fine.

Is there something I'm missing?
(Is there a better way to do what I'm trying to accomplish?)

  • 4
    I just have to ask, what are you using this for? – Darth Android Aug 15 '13 at 16:40
3

I figured it out!

I had the grand idea to capture the output of the script running at boot.

Turns out it couldn't find the usermod command, so I changed the script to use the full path of /usr/sbin/usermod and now it works fine.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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