Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

User can't login in


  • Please log in to reply
3 replies to this topic

#1 koniq

koniq

  • Members
  • 2 posts
  • OFFLINE
  •  
  • Local time:01:10 PM

Posted 28 June 2014 - 12:32 PM

Hi,

I'm crawling on all fours in linux and below I wrote about a problem I need to solve.

I try to log in to console. Somebody before me locked one account and I need it now.

From root user what I get for :

- passwd -S username is :

  username PS 2014-06-28 0 99999 7 100000

-grep username /etc/shadow is :

  username:md5ofpasswithout!:16249:0:99999:7:100000:18262:

I have no idea how the user was locked and how to unlock this user.

I will appreciate every tip how to unlock the user.

Before posting this thread I tried : 

usermod --password xxxxx username
usermod -U username
usermod -e 2020-01-01 username

Edited by koniq, 28 June 2014 - 12:35 PM.


BC AdBot (Login to Remove)

 


#2 sflatechguy

sflatechguy

  • BC Advisor
  • 2,233 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:07:10 AM

Posted 28 June 2014 - 03:07 PM

That is odd -- apparently the account has a password and it's not even locked. I see the account has an expiry date, but that's not until 2020.

 

Make sure you are running those commands as root. If usermod -U isn't working, try passwd -u username

 

If that doesn't work, try this: pam_tally --user=username --reset

 

The pam_tally module monitors login attempts and can lock an account if there are too many failed login attempts. Resetting it should clear any issues with it. Again, run that as root.



#3 koniq

koniq
  • Topic Starter

  • Members
  • 2 posts
  • OFFLINE
  •  
  • Local time:01:10 PM

Posted 29 June 2014 - 04:58 AM

All I already made was from root, I tried what you adviced ( passwd -u ,usermod -U and pam_tally ) but without success :/,

still cannot log in.

 

 

Edit : 

I'm sorry for my honesty but why the f**k is the documentation saying that "passwd -p username" changes the password ? 

I found that after executing mentioned command file /etc/shadow stores not encrypted passord and that was the problem !!

After executing "passwd username" password has changed (/etc/shadow has it hashed) and I am able to login as user I wanted. 

sflatechguy - thank's for help.

 

 

Thread can be closed


Edited by koniq, 29 June 2014 - 05:56 AM.


#4 sflatechguy

sflatechguy

  • BC Advisor
  • 2,233 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:07:10 AM

Posted 29 June 2014 - 10:40 AM

That would explain it. The -P option is used with passwd to create a passwd for a user account that was created without a passwd. This is the default setting when creating users -- you have to specifiy that the account has a password; otherwise, you'll have to create one later.

 

The -p option is used with the login command to change the user's password at login.

 

Otherwise, to change a password, just use the passwd command, no options. Is that documentation in the man page on your system? If so, you might want to email the contact listed at the bottom of the page and point out that error to them.

 

Glad you got it fixed. :thumbup2:






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users