LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-13-2014, 03:46 AM   #1
kairen
Member
 
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108

Rep: Reputation: 15
Login possible with half of the password in Slack64 14.1


Hi,

I want to ask how it is possible to login to my user account with only half of the password or the whole password. Root account does not allow this.

My password is 16 symbols long but somehow I only need to type the first 8 of them. Root pass is 15 symbols and all are required to login.

In /etc/shadow root pass is encrypted with this Vrx$71XzduMSQWtoNPTr2Qoqh591NtyAe91DUOI8twQq.p9

and my pass with this
qa0mmfGrSWyEc

Is that the problem? How can I fix that?

Distro is Slackware64 14.1

Thanks for your time
 
Old 08-13-2014, 04:35 AM   #2
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,910

Rep: Reputation: 5026Reputation: 5026Reputation: 5026Reputation: 5026Reputation: 5026Reputation: 5026Reputation: 5026Reputation: 5026Reputation: 5026Reputation: 5026Reputation: 5026
Check you /etc/login.defs file. What is ENCRYPT_METHOD set to?

Looks like your user is using a DES encrypted password (lack of a $id$ prefix is the clue), which would explain why only 8 chars are being treated as significant. I don't even recognise the encoding on your root user, normally I'd expect to see password strings starting with "$5$" on a default Slackware 14.1 as it uses SHA256 encryption as shipped.

If your login.defs file is correct(ed), you should be able to fix the passwords by simply running the passwd command to change them again (you can specify the same password string as you used previously - though now you've posted the encrypted strings for the world to see, that's probably not a good idea ).

Last edited by GazL; 08-13-2014 at 04:39 AM.
 
Old 08-13-2014, 04:36 AM   #3
calrogman
LQ Newbie
 
Registered: Mar 2014
Distribution: Slackware!
Posts: 13

Rep: Reputation: 3
Hello.

In the case of DES, the key (that is, password) used to create the encrypted password uses the lowest 7 bits of the first 8 characters, for a 56-bit key. Check that ENCRYPT_METHOD in /etc/login.defs is set to MD5, SHA256 (this is what it should be set to by default on Slackware 14.1; your case is unusual, is this an install you've upgraded repeatedly?) or SHA512. For these, the entirety of the key is significant. Once you've confirmed this, change your password.

HTH :-)
 
Old 08-13-2014, 04:47 AM   #4
kairen
Member
 
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by GazL View Post
Check you /etc/login.defs file. What is ENCRYPT_METHOD set to?

If your login.defs file is correct(ed), you should be able to fix the passwords by simply running the passwd command to change them again (you can specify the same password string as you used previously - though now you've posted the encrypted strings for the world to see, that's probably not a good idea ).
You really think I posted them without some minor changes here and there? Think again
 
Old 08-13-2014, 04:54 AM   #5
kairen
Member
 
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108

Original Poster
Rep: Reputation: 15
I've never touched login.defs before.

from /etc/login.defs

ENCRYPT_METHOD SHA256


It is a clean install after the hard drive broke and was replaced.

Is it possible to have 2 encryption methods for different users? Root pass do have $id$ at the beginning while my user do not.

Last edited by kairen; 08-13-2014 at 04:57 AM.
 
Old 08-13-2014, 04:57 AM   #6
calrogman
LQ Newbie
 
Registered: Mar 2014
Distribution: Slackware!
Posts: 13

Rep: Reputation: 3
That's very odd. Changing your password should fix your immediate problem, but you should consider performing an audit to ensure these issues aren't due to any malicious activity.
 
Old 08-13-2014, 04:59 AM   #7
WiseDraco
Member
 
Registered: Nov 2006
Location: Europe,Latvia,Riga
Distribution: slackware,slax, OS X, exMandriva
Posts: 591

Rep: Reputation: 73
cannot confirm this to my slack64 14.1 - cannot login to user with 8 symb instead of full 10 symbols password, and also in sjhadows user password starts with $5$...
 
Old 08-13-2014, 05:01 AM   #8
kairen
Member
 
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by calrogman View Post
That's very odd. Changing your password should fix your immediate problem, but you should consider performing an audit to ensure these issues aren't due to any malicious activity.
What can I do to check that? I need to know if this computer is clean for it is my office workstation.
 
Old 08-13-2014, 05:04 AM   #9
calrogman
LQ Newbie
 
Registered: Mar 2014
Distribution: Slackware!
Posts: 13

Rep: Reputation: 3
Quote:
Originally Posted by kairen View Post
Is it possible to have 2 encryption methods for different users? Root pass do have $id$ at the beginning while my user do not.
Yes. The purpose of the $id$ field is to allow different users to use different password encryption methods. Generally, all users will use the same method, however, if the administrator (or shadow-utils) changed the default encryption method, you would still want to be able to log in; and for a time, some users would be using the new encryption method, while others used the old.
 
Old 08-13-2014, 05:11 AM   #10
kairen
Member
 
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by calrogman View Post
Yes. The purpose of the $id$ field is to allow different users to use different password encryption methods. Generally, all users will use the same method, however, if the administrator (or shadow-utils) changed the default encryption method, you would still want to be able to log in; and for a time, some users would be using the new encryption method, while others used the old.

I am the administrator and I didn't do anything like this.
 
Old 08-13-2014, 05:12 AM   #11
calrogman
LQ Newbie
 
Registered: Mar 2014
Distribution: Slackware!
Posts: 13

Rep: Reputation: 3
Quote:
Originally Posted by kairen View Post
I am the administrator and I didn't do anything like this.
That was a hypothetical scenario explaining why $id$ exists and that yes, you can have different methods for different users.

:^)
 
Old 08-13-2014, 05:15 AM   #12
kairen
Member
 
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by calrogman View Post
That was a hypothetical scenario explaining why $id$ exists and that yes, you can have different methods for different users.

:^)

Right, I just wanted to clarify that no one else is configuring my machine but myself. At least not legally.
 
Old 08-13-2014, 05:28 AM   #13
kairen
Member
 
Registered: Oct 2006
Location: Bulgaria
Distribution: Slackware64 14.1, CentOS 7
Posts: 108

Original Poster
Rep: Reputation: 15
I changed the password and now it looks properly encrypted. What do you suggest I do next?
 
Old 08-13-2014, 05:38 AM   #14
calrogman
LQ Newbie
 
Registered: Mar 2014
Distribution: Slackware!
Posts: 13

Rep: Reputation: 3
Check your logs, disable unnecessary services, verify the integrity of the services you are running, check that your bootscript have not been tampered with, check for any setuid executables that shouldn't be.
 
Old 08-13-2014, 05:46 AM   #15
WiseDraco
Member
 
Registered: Nov 2006
Location: Europe,Latvia,Riga
Distribution: slackware,slax, OS X, exMandriva
Posts: 591

Rep: Reputation: 73
Quote:
Originally Posted by kairen View Post
I changed the password and now it looks properly encrypted. What do you suggest I do next?
look there:
http://slackbuilds.org/result/?search=intrusion&sv=14.1

http://www.alienvault.com/blogs/secu...quick-overview
 
  


Reply

Tags
login, password, shadow



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] SSH on Slack64-13.1 no longer works - Wrong password? lpallard Slackware 3 07-06-2013 09:45 PM
Ubuntu 11.04 encrypted LVM password not working after user login password change prateekm21 Linux - Security 0 10-29-2011 01:20 PM
seen a Visual Password login for Linux? like the droids 9 circle password? szboardstretcher Linux - Software 3 03-07-2011 09:49 AM
Slack64 - How to change my login/account name without screwing everything up? GrapefruiTgirl Slackware 9 09-21-2009 03:31 AM
root password half-working... phoenixtx Linux - General 4 05-02-2004 09:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration