LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 03-19-2010, 07:16 AM   #1
metageek
Member
 
Registered: Jun 2007
Location: Farmington, CT
Distribution: Slackware64
Posts: 204

Rep: Reputation: 44
migrating user accounts from SLES to Slackware


I've just rebuilt a server that had SLES10 to Slackware64 13.0.
I wanted to keep all users and their passwords, so I copied all user entries in the old SLES /etc/passwd and /etc/shadow files to the corresponding new Slackware files. It turns out that the passwords are not interpreted correctly. I presume that SLES uses a different hashing function than slackware. Is there an easy way to convert these hashes, or will I have to reset all passwords and force users to change at login?
 
Old 03-19-2010, 08:16 AM   #2
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,901

Rep: Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025Reputation: 5025
There's an ENCRYPT_METHOD specification in /etc/login.defs which may let you use the old passwords as is. I've never tried playing with this though, so approach with caution, and probably a good idea to leave root logged onto a console while you check you can get back in.

Unless you've got hundreds of users that make it impractical, or some other technical reason you can't change the passwords then in your situation I'd be inclined to re-issue everyone with passwords. Running with a non-default password hash is the sort of thing that might pop up and bite you some time in the future when the knowledge that you'd changed it from the default has long since been forgotten.

Last edited by GazL; 03-19-2010 at 08:18 AM.
 
Old 03-19-2010, 08:22 AM   #3
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
The first part of the password hash will tell you what algorithm was used

$1$ = md5
$2$ = blowfish
$5/6$ = sha256/512

From there you can determine whether it's supported on the new OS

<edit>no... you can't convert the hashes, they're one-way hashes</edit>
cheers

Last edited by kbp; 03-19-2010 at 08:24 AM.
 
Old 03-19-2010, 08:42 AM   #4
metageek
Member
 
Registered: Jun 2007
Location: Farmington, CT
Distribution: Slackware64
Posts: 204

Original Poster
Rep: Reputation: 44
Thanks GazL and kbp,

so it is $2a$10$ which I presume be some variation of blowfish.
I go by GazL's warning and will reissue new passwords.

kbp: yes, it then dawned on me that to convert them it would take the same effort as to crack them...
 
  


Reply



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
What would cause all accounts to be LOCKED (in SLES 10) ? ron7000 Linux - General 1 11-27-2007 03:08 PM
Migrating User Accounts from HP-UX to Linux kaplan71 Fedora 1 08-15-2006 04:17 PM
Migrating Samba accounts to new server kkolehma Linux - Networking 0 10-14-2005 03:39 AM
migrating accounts from maching and distribution version linuxnube Linux - General 2 03-08-2005 06:53 PM
Slackware user accounts sajentyst Linux - Software 8 02-12-2005 10:52 AM

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

All times are GMT -5. The time now is 11:57 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