Converting freebsd (5.2.1) master.passwd to Debian shadow


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Converting freebsd (5.2.1) master.passwd to Debian shadow
# 1  
Old 11-06-2009
Converting freebsd (5.2.1) master.passwd to Debian shadow

I'm trying to make this work, and it half works. Accounts with password hashes matching the old crypt(3) algorithm work just fine:

JUpfW/w6jo6aw

But accounts with longer password hashes preceded by $1$, such as the following, do not work:

$1$iIcbppdP$HDyjJeVMGgJ.ovLsnjtTR.
$1$SjC4EQzq$y8iVMbr5p.t83Jk5LHSWi0

The thing is, if I change a password on the new Debian system, it still uses the $1$... format (MD5 I think?) so apparently the old BSD system is using an older/different MD5 hashing algorithm.

Anyone know how I might make this work or if I might be doing something else wrong?

---------- Post updated at 02:21 PM ---------- Previous update was at 01:18 PM ----------

ok, things get stranger. I made a test account that transfers just fine using the md5 hash, but the one particular account (which happens to be the most important) doesn't work. I guess if it's the only one I can just do a passwd command for this one account

---------- Post updated at 04:45 PM ---------- Previous update was at 02:21 PM ----------

Ok, I don't think the problem is the md5 compatibility. I think it's something more subtle. I recall, when reading about PAM, that for security reasons, even if it's not the password stopping the login, the system may tell the user their password is bad.

So far I've noticed that people with the old crypt hash can log in to webmail no matter what. Unfortunately, I didn't test any shell logins for these users until I had changed all shells to /bin/bash

People with the MD5 hash apparently could not login to webmail unless the shell existed (Debian only has bash, and two links to bash from rbash and sh). I need to do a little more testing, but changing all shells to bash seems to have allowed all users to login now. No failures so far anyway.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Passwd -l or -u modifies lastchg field in /etc/shadow file

Hi, I have a Solaris 10 box where password aging is not functioning properly. Using the passwd command with the -l or -u options causes the lastchg field in the /etc/shadow file to be modified. Therefore, if a user's password is set to expire in 90 days and they are 1 day away, all they have... (4 Replies)
Discussion started by: cschar
4 Replies

2. UNIX Desktop Questions & Answers

How can I replicate master master and master master MySQL databse replication and HA?

I have an application desigend in PHP and MySQl running on apache web server that I is running on a Amazon EC2 server Centos. I want to implement the master-master and master slave replication and high availability disaster recovery on this application database. For this I have created two... (0 Replies)
Discussion started by: Palak Sharma
0 Replies

3. Solaris

Passwd,shadow files deleted and abort sequence disabled

Hi all.. I moved the /etc/shadow and /etc/shadow files to /tmp and then rebooted my PARC machine running 5.10. I did it to see if I could recover from single user mode. But, I forgot to enable the abort key-sequence which I earlier disabled. Stuck! One of my gurus told I had to... (9 Replies)
Discussion started by: satish51392111
9 Replies

4. UNIX for Advanced & Expert Users

psswd&shadow 2 passwd together?!!

hi, all I just started on new box where I have to diff passwd working perfectly on the very same account/user. I see that shadow was added recently (I'm not a root in there), I see 'x' in passwd. Not sure how it should work, should I change old passwd for one defined in shadow? Or it's fine to... (20 Replies)
Discussion started by: trento17
20 Replies

5. Shell Programming and Scripting

clean passwd file based on db table (master)

The purpose of this script is to scan the /etc/passwd file one line at a time comparing the usernames to the usernames found in a database table. I will later locked every account which is not in the database table. I have export the userlist from the database in a file (/tmp/userlist). It... (1 Reply)
Discussion started by: Banks187
1 Replies

6. Solaris

difference between /etc/shadow and /etc/default/passwd

Hi , can anyone explain me the difference between /etc/shadow and /etc/default/passwd . As per my knowledge both the files are used for password aging and control parameters. (2 Replies)
Discussion started by: rogerben
2 Replies

7. Solaris

passwd cmd reenables passwd aging in shadow entry

Hi Folks, I have Solaris 10, latest release. We have passwd aging set in /etc/defalut/passwd. I have an account that passwd should never expire. Acheived by emptying associated users shadow file entries for passwd aging. When I reset the users passwd using passwd command, it re enables... (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies

8. Solaris

tool to convert /etc/passwd and etc/shadow

i wonder if there is a tool to read the /etc/passwd or /etc/shadow files in order to reset user accounts to the same one. By moving (restore) all filessytem and data to another same Sun box, none of the users are able to logon to the new box which i didn't change nothing. But if i reset the user... (1 Reply)
Discussion started by: lamoul
1 Replies

9. UNIX for Dummies Questions & Answers

How to : Identify the the password is encrypted or not in /etc/shadow or /etc/passwd?

Thanks AVKlinux (11 Replies)
Discussion started by: avklinux
11 Replies

10. BSD

Migrating the master.passwd

I am migrating the passwd file to an new server. What commands do I need to run to make sure the file will work on the new server. (0 Replies)
Discussion started by: rbizzell
0 Replies
Login or Register to Ask a Question