Sponsored Content
Top Forums UNIX for Advanced & Expert Users Converting freebsd (5.2.1) master.passwd to Debian shadow Post 302369130 by davidstvz on Friday 6th of November 2009 05:45:15 PM
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.
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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

9. 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

10. 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
SHADOW(5)							File Formats Manual							 SHADOW(5)

NAME
shadow - encrypted password file DESCRIPTION
shadow contains the encrypted password information for user's accounts and optional the password aging information. Included is Login name Encrypted password Days since Jan 1, 1970 that password was last changed Days before password may be changed Days after which password must be changed Days before password is to expire that user is warned Days after password expires that account is disabled Days since Jan 1, 1970 that account is disabled A reserved field The password field must be filled. The encryped password consists of 13 to 24 characters from the 64 character alphabet a thru z, A thru Z, 0 thru 9, . and /. Refer to crypt(3) for details on how this string is interpreted. The date of the last password change is given as the number of days since Jan 1, 1970. The password may not be changed again until the proper number of days have passed, and must be changed after the maximum number of days. If the minimum number of days required is greater than the maximum number of day allowed, this password may not be changed by the user. An account is considered to be inactive and is disabled if the password is not changed within the specified number of days after the pass- word expires. An account will also be disabled on the specified day regardless of other password expiration information. This information supercedes any password or password age information present in /etc/passwd. This file must not be readable by regular users if password security is to be maintained. FILES
/etc/passwd - user account information /etc/shadow - encrypted user passwords SEE ALSO
chage(1), login(1), passwd(1), su(1), passwd(5), pwconv(8), pwunconv(8), sulogin(8) AUTHOR
Julianne Frances Haugh (jockgrrl@ix.netcom.com) SHADOW(5)
All times are GMT -4. The time now is 08:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy