passwd: permission denied error when trying to update a user's password











up vote
1
down vote

favorite












I just installed Ubuntu on a new machine and everything seemed to be going fine. I and a coworker were having some issues with a few things and have managed to lock-out a local admin (sudo?) account after unjoining an AD domain using realm while troubleshooting some McAfee issues were were having. I'm 99.9% certain that the password has not changed for the user. I have followed ALL the steps found here for resetting the password as root in recovery. When I try to run



sudo passwd USERNAME



I get the error:



root@hostname:~# sudo passwd USERNAME
passwd:Permission denied
passwd:password unchanged
root@hostname:~#



When I try to do the steps for the "The Drastic Measures", I notice that the shadow file does not show what would usually indicate an encrypted password for the user. Instead it looks like:



username:!:14920:0:99999:7:::



I have removed the exclamation point and still have issues. Even when I run



passwd



as root through recovery, I get a permissions denied error. As it stands right now, I can only log into the machine as root through recovery. I'm at a complete loss at this point and trying to avoid breaking down the machine and starting from scratch. Any help you guys can provide would be greatly appreciated.










share|improve this question
























  • My guess is you have to remount your root file system rw . Also you do not need to run sudo as you are already root. Last USERNAME is not the same as username and neither is likely your actual username.
    – Panther
    Nov 21 '16 at 20:08










  • See wiki.ubuntu.com/RecoveryMode , step 8 and askubuntu.com/questions/804036/cant-reset-password
    – Panther
    Nov 21 '16 at 20:09






  • 1




    Possible duplicate of How do I reset a lost administrative password?
    – Panther
    Nov 21 '16 at 20:09










  • I made sure to run the mount -o remount,rw / before going through the steps in the link I posted. I still had those issues. BTW, username is def. not a real username. I'm working on a "govt" system so changed it to protect the innocent.
    – ProAm500
    Nov 21 '16 at 20:28












  • If it is a "govt" system, I would expect it to use some kind of non-local password management such as ldap
    – steeldriver
    Nov 22 '16 at 0:16















up vote
1
down vote

favorite












I just installed Ubuntu on a new machine and everything seemed to be going fine. I and a coworker were having some issues with a few things and have managed to lock-out a local admin (sudo?) account after unjoining an AD domain using realm while troubleshooting some McAfee issues were were having. I'm 99.9% certain that the password has not changed for the user. I have followed ALL the steps found here for resetting the password as root in recovery. When I try to run



sudo passwd USERNAME



I get the error:



root@hostname:~# sudo passwd USERNAME
passwd:Permission denied
passwd:password unchanged
root@hostname:~#



When I try to do the steps for the "The Drastic Measures", I notice that the shadow file does not show what would usually indicate an encrypted password for the user. Instead it looks like:



username:!:14920:0:99999:7:::



I have removed the exclamation point and still have issues. Even when I run



passwd



as root through recovery, I get a permissions denied error. As it stands right now, I can only log into the machine as root through recovery. I'm at a complete loss at this point and trying to avoid breaking down the machine and starting from scratch. Any help you guys can provide would be greatly appreciated.










share|improve this question
























  • My guess is you have to remount your root file system rw . Also you do not need to run sudo as you are already root. Last USERNAME is not the same as username and neither is likely your actual username.
    – Panther
    Nov 21 '16 at 20:08










  • See wiki.ubuntu.com/RecoveryMode , step 8 and askubuntu.com/questions/804036/cant-reset-password
    – Panther
    Nov 21 '16 at 20:09






  • 1




    Possible duplicate of How do I reset a lost administrative password?
    – Panther
    Nov 21 '16 at 20:09










  • I made sure to run the mount -o remount,rw / before going through the steps in the link I posted. I still had those issues. BTW, username is def. not a real username. I'm working on a "govt" system so changed it to protect the innocent.
    – ProAm500
    Nov 21 '16 at 20:28












  • If it is a "govt" system, I would expect it to use some kind of non-local password management such as ldap
    – steeldriver
    Nov 22 '16 at 0:16













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I just installed Ubuntu on a new machine and everything seemed to be going fine. I and a coworker were having some issues with a few things and have managed to lock-out a local admin (sudo?) account after unjoining an AD domain using realm while troubleshooting some McAfee issues were were having. I'm 99.9% certain that the password has not changed for the user. I have followed ALL the steps found here for resetting the password as root in recovery. When I try to run



sudo passwd USERNAME



I get the error:



root@hostname:~# sudo passwd USERNAME
passwd:Permission denied
passwd:password unchanged
root@hostname:~#



When I try to do the steps for the "The Drastic Measures", I notice that the shadow file does not show what would usually indicate an encrypted password for the user. Instead it looks like:



username:!:14920:0:99999:7:::



I have removed the exclamation point and still have issues. Even when I run



passwd



as root through recovery, I get a permissions denied error. As it stands right now, I can only log into the machine as root through recovery. I'm at a complete loss at this point and trying to avoid breaking down the machine and starting from scratch. Any help you guys can provide would be greatly appreciated.










share|improve this question















I just installed Ubuntu on a new machine and everything seemed to be going fine. I and a coworker were having some issues with a few things and have managed to lock-out a local admin (sudo?) account after unjoining an AD domain using realm while troubleshooting some McAfee issues were were having. I'm 99.9% certain that the password has not changed for the user. I have followed ALL the steps found here for resetting the password as root in recovery. When I try to run



sudo passwd USERNAME



I get the error:



root@hostname:~# sudo passwd USERNAME
passwd:Permission denied
passwd:password unchanged
root@hostname:~#



When I try to do the steps for the "The Drastic Measures", I notice that the shadow file does not show what would usually indicate an encrypted password for the user. Instead it looks like:



username:!:14920:0:99999:7:::



I have removed the exclamation point and still have issues. Even when I run



passwd



as root through recovery, I get a permissions denied error. As it stands right now, I can only log into the machine as root through recovery. I'm at a complete loss at this point and trying to avoid breaking down the machine and starting from scratch. Any help you guys can provide would be greatly appreciated.







permissions password password-recovery






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 13 '17 at 12:23









Community

1




1










asked Nov 21 '16 at 20:02









ProAm500

612




612












  • My guess is you have to remount your root file system rw . Also you do not need to run sudo as you are already root. Last USERNAME is not the same as username and neither is likely your actual username.
    – Panther
    Nov 21 '16 at 20:08










  • See wiki.ubuntu.com/RecoveryMode , step 8 and askubuntu.com/questions/804036/cant-reset-password
    – Panther
    Nov 21 '16 at 20:09






  • 1




    Possible duplicate of How do I reset a lost administrative password?
    – Panther
    Nov 21 '16 at 20:09










  • I made sure to run the mount -o remount,rw / before going through the steps in the link I posted. I still had those issues. BTW, username is def. not a real username. I'm working on a "govt" system so changed it to protect the innocent.
    – ProAm500
    Nov 21 '16 at 20:28












  • If it is a "govt" system, I would expect it to use some kind of non-local password management such as ldap
    – steeldriver
    Nov 22 '16 at 0:16


















  • My guess is you have to remount your root file system rw . Also you do not need to run sudo as you are already root. Last USERNAME is not the same as username and neither is likely your actual username.
    – Panther
    Nov 21 '16 at 20:08










  • See wiki.ubuntu.com/RecoveryMode , step 8 and askubuntu.com/questions/804036/cant-reset-password
    – Panther
    Nov 21 '16 at 20:09






  • 1




    Possible duplicate of How do I reset a lost administrative password?
    – Panther
    Nov 21 '16 at 20:09










  • I made sure to run the mount -o remount,rw / before going through the steps in the link I posted. I still had those issues. BTW, username is def. not a real username. I'm working on a "govt" system so changed it to protect the innocent.
    – ProAm500
    Nov 21 '16 at 20:28












  • If it is a "govt" system, I would expect it to use some kind of non-local password management such as ldap
    – steeldriver
    Nov 22 '16 at 0:16
















My guess is you have to remount your root file system rw . Also you do not need to run sudo as you are already root. Last USERNAME is not the same as username and neither is likely your actual username.
– Panther
Nov 21 '16 at 20:08




My guess is you have to remount your root file system rw . Also you do not need to run sudo as you are already root. Last USERNAME is not the same as username and neither is likely your actual username.
– Panther
Nov 21 '16 at 20:08












See wiki.ubuntu.com/RecoveryMode , step 8 and askubuntu.com/questions/804036/cant-reset-password
– Panther
Nov 21 '16 at 20:09




See wiki.ubuntu.com/RecoveryMode , step 8 and askubuntu.com/questions/804036/cant-reset-password
– Panther
Nov 21 '16 at 20:09




1




1




Possible duplicate of How do I reset a lost administrative password?
– Panther
Nov 21 '16 at 20:09




Possible duplicate of How do I reset a lost administrative password?
– Panther
Nov 21 '16 at 20:09












I made sure to run the mount -o remount,rw / before going through the steps in the link I posted. I still had those issues. BTW, username is def. not a real username. I'm working on a "govt" system so changed it to protect the innocent.
– ProAm500
Nov 21 '16 at 20:28






I made sure to run the mount -o remount,rw / before going through the steps in the link I posted. I still had those issues. BTW, username is def. not a real username. I'm working on a "govt" system so changed it to protect the innocent.
– ProAm500
Nov 21 '16 at 20:28














If it is a "govt" system, I would expect it to use some kind of non-local password management such as ldap
– steeldriver
Nov 22 '16 at 0:16




If it is a "govt" system, I would expect it to use some kind of non-local password management such as ldap
– steeldriver
Nov 22 '16 at 0:16










1 Answer
1






active

oldest

votes

















up vote
0
down vote













Sol:



vi /etc/pam.d/common-password
password [success=3 default=ignore]
pam_unix.so obscure sha512


=> Change it to "success=2"



Smile!






share|improve this answer



















  • 1




    What does this change do?
    – PerlDuck
    Nov 19 at 11:18











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f852056%2fpasswd-permission-denied-error-when-trying-to-update-a-users-password%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













Sol:



vi /etc/pam.d/common-password
password [success=3 default=ignore]
pam_unix.so obscure sha512


=> Change it to "success=2"



Smile!






share|improve this answer



















  • 1




    What does this change do?
    – PerlDuck
    Nov 19 at 11:18















up vote
0
down vote













Sol:



vi /etc/pam.d/common-password
password [success=3 default=ignore]
pam_unix.so obscure sha512


=> Change it to "success=2"



Smile!






share|improve this answer



















  • 1




    What does this change do?
    – PerlDuck
    Nov 19 at 11:18













up vote
0
down vote










up vote
0
down vote









Sol:



vi /etc/pam.d/common-password
password [success=3 default=ignore]
pam_unix.so obscure sha512


=> Change it to "success=2"



Smile!






share|improve this answer














Sol:



vi /etc/pam.d/common-password
password [success=3 default=ignore]
pam_unix.so obscure sha512


=> Change it to "success=2"



Smile!







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 19 at 10:12









PerlDuck

4,83111130




4,83111130










answered Nov 19 at 10:01









Gyanesh

1




1








  • 1




    What does this change do?
    – PerlDuck
    Nov 19 at 11:18














  • 1




    What does this change do?
    – PerlDuck
    Nov 19 at 11:18








1




1




What does this change do?
– PerlDuck
Nov 19 at 11:18




What does this change do?
– PerlDuck
Nov 19 at 11:18


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f852056%2fpasswd-permission-denied-error-when-trying-to-update-a-users-password%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?

Title Spacing in Bjornstrup Chapter, Removing Chapter Number From Contents