Impossible to install Jenkins

"sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat/jenkins.repo" failed with the error "sudo: Account or password is expired, reset your password and try again

Changing password for root."

(Even if I changed the temporary password five minutes ago)

Okay, but when I try to change it again I just get the error "sudo: unable to change expired password: Authentication token manipulation error" (it does not matter do I try my new password or the old one)

So it's impossible to install Jenkins and impossible to continue the course. Can I have my money back?

  • post-author-pic
    Jake W
    12-14-2018

    Are you running the wget command as the root user, by chance?

  • post-author-pic
    Jake W
    12-14-2018

    Yeah, I was able to replicate this behavior as the root user and see where it specifies "Changing password for root."

    So, when you invoke sudo while root, the sudoers policy is still set up to require a password due to the fact that sudo is essentially re-authenticating you as that user. Because root's password is expired, you would have to know the current one in order to set it.

    In short, you are a proper sudoer, but you don't know the root account password to provide it to your invocation of sudo. If you run this as your own user (cloud_user by default) and escalate with your own password, the wget command should run successfully as written.

  • post-author-pic
    Jake W
    12-14-2018

    Did some more digging and made a few edits to make the answer clearer. It's also worth noting that if you really want to change the local root password (though you should typically escalate to root), you can do so with 'sudo passwd root.'

    Just keep in mind that root logins are not allowed, per the sshd_config having 'permitrootlogin yes' commented out by default, so you won't be able to SSH to your servers with root@IP/hostname or something to that effect.

    Hope this helps!

  • post-author-pic
    Michael M
    12-14-2018

    Hello,


    I really appreciate your feedback on this issue. It is something that I had not noticed previously.
     I also appreciate Jakes input and he is absolutely correct. You cannot sudo as root.
     In the video lesson, the first command that I run is 'sudo su' once this is done it is no longer required to issue the sudo prior to each command. 
    This was the way that the commands were listed in the video description, I have updated the command list in the video description so that it is more clear and now using the commands listed in the description should result in success.

Looking For Team Training?

Learn More