Hmm... strange, I just copied the encrypted password from my CentOS
system for a user and copied it to the /etc/shadow for the same userid
in Ubuntu and it works for me just fine.

If you are simply migrating the usernames and passwords from the
CentOS system to Ubuntu system, then the following one liner bash
script will add the users and passwords from your CentOS shadow file
to the Ubuntu system (modify as you see fit, backup the shadow file in
ubuntu first):

shadow1 - CentOS shadow file

for i in `cat shadow1 |cut -f1 -d:`;do useradd -p `grep $i shadow1|cut
-f2 -d:` $i;done;

CAUTION: I never tested this script. Just wrote from the top of my head.

- Zia


On Mon, Jul 27, 2009 at 12:04 AM, Fakrul Alam<[email protected]> wrote:
> Nice to see u Zia Bhai. I have tried to copy past the shadow file, but it 
> doesn't work. Bash script is one solution but it will change the users 
> password. Than I need another bash script in my PABX to answer those changed 
> password :-)
>
> Fakrul Alam
>
>
>
>
> ________________________________
> From: M Z R <[email protected]>
> To: [email protected]
> Sent: Sunday, 26 July, 2009 21:22:05
> Subject: Re: [bdlug] User migration from CentOS to Ubuntu
>
>
> AFAIK, both CentOS & Ubuntu uses MD5 to encrypt the clear text
> password. No diff.
>
> You could try by simply copying and pasting the encrypted password
> from CentOS to Ubuntu for one user and try logging in. That should
> give you the answer. :)
>
> As for changing passwords for 8000 users, bash is you friend. A for
> loop with 'usermod -p' would do.
>
> Hope that helps.
>
> - Zia
> P.S.: Logged in to my Mailing List email after a long time and saw
> your email, could not help but reply. :)
>
> On Sun, Jul 26, 2009 at 12:39 PM, Fakrul Alam<fakrul_alam@ yahoo.com> wrote:
>> Hi,
>> I have one mail server running on CentOS 5.1 which contain
>> around 8000 users. I like to migrate the server to Ubuntu Server.
>> Usually when I install new server I just copy /etc/passwd, /etc/shadow
>> & /etc/group files; which takes all the users with password. As far
>> as I know, CentOS shadow file and Ubuntu shadow file password algorithm
>> is not same. Is there any way to take the password/shadow from CentOS
>> and use it in the Ubuntu?
>>
>> BR
>>
>> Fakrul Alam
>>
>>
>>
>>
>> [Non-text portions of this message have been removed]
>>
>>
>>
>> ------------ --------- --------- ------
>>
>> To unsubscribe send a blank mail to:
>>        bdlug-unsubscribe@ egroups.comYahoo! Groups Links
>>
>>
>>
>>
>
> --
> Ziaur Rahman
> Email: [email protected],mzrah...@gmail. com
> Web: http://www.zort. org
> PGP Key: 0x1C1C0123 (http://pgp.mit. edu)
> Finger: http://stuff. mit.edu/cgi/ finger?zia@ zort.org
> --
> A. Read RFC1855:Sect2. 1.1(Point 21), Sect3.1.1(Point 10).
> Q. Why do you answer at the bottom of the email?
> --
> .-.-.-.-.-.- .-.-.- Quote-o-moment .-.-.-.-.-.- .-.-.-.
>
> Monday is an awful way to spend one seventh of your life.
>
> .-.-.-.-.-.- .-.-.- Quote-o-moment .-.-.-.-.-.- .-.-.-.
>
>
>
>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
> To unsubscribe send a blank mail to:
>        [email protected]! Groups Links
>
>
>
>



-- 
Ziaur Rahman
Email: [email protected],[email protected]
Web: http://www.zort.org
PGP Key: 0x1C1C0123 (http://pgp.mit.edu)
Finger: http://stuff.mit.edu/cgi/[email protected]
--
A. Read RFC1855:Sect2.1.1(Point 21), Sect3.1.1(Point 10).
Q. Why do you answer at the bottom of the email?
--
.-.-.-.-.-.-.-.-.- Quote-o-moment .-.-.-.-.-.-.-.-.-.

Monday is an awful way to spend one seventh of your life.

.-.-.-.-.-.-.-.-.- Quote-o-moment .-.-.-.-.-.-.-.-.-.

Reply via email to