[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]
Re: [LI] password file from sco to linux : a solution
- Subject: Re: [LI] password file from sco to linux : a solution
- From: "Vishal Khanna" <vishal@xxxxxxxxxxxxxxxxxxx>
- Date: Tue, 17 Aug 1999 10:21:48 +0530
Dear Sunil,
what you are trying to emulate needs more than copying files around the
system, I am providng you with an alternate I use in the case as described
by you
try using a shell script which is as below : <<PLEASE USE AT OWN RISK
:-)) )>> remember we use a md5 based password script !!!. the passwords are
kept in a file [ pw ], yes we store them in a file :-)
And above all the same passwords JUST CANNOT work by copying the
/etc/passwd file ( read the man page for passwd(1), and the Unix encryption
technique.
#!/bin/sh
#####################################################################
#
# $Id: adduser.sh,v 1.7 1999/03/09 12:30:36 vkh Exp $
#
# creat all user accounts for the mail system of AIT.
# Remember to have the pw file and the corrrect entries in the /etc/aliases
in this file
# (c): vkhanna@xxxxxxxxxxxxxxxxxxx, 1998-99
#
# Last modifed: See CVS for history of changes (vk)
#####################################################################
while read line; do
fullname=`echo $line | cut -f1 -d:`
mailname=`echo $line | cut -f2 -d: | sed "s/ //"`
password=`echo ${mailname} | /sbin/md5 | tail -9c`
printf "%-10s %-30s %s\n" "${mailname}" "${fullname}" "${password}"
printf "\n\n"
adduser -home /var/mail/Homes -dotdir no -uid 5000 \
-group post -message no \
-batch ${mailname} "" "" "${fullname}" "${password}"
done <<EOF-EOF-EOF >> pw
Vishal Khanna: vkhanna
Neelu Gora: ng
EOF-EOF-EOF
exit 0
the entries between the <<EOF-EOF-EOF>> are the entries on your /etc/aliases
file basically, I use this to recounstruct when a failure of the system
occurs or when migrating the mail system for interim purposes.
Use appropriately !!!
Vishal K
>Hi,
>
>I am trying to shift my e-mail server from SCO-UNIX to LINUX. I've tried
>copying the /etc/passwd file from SCO system to linux. I've observed that
>the format is similar to that of LINUX. But even after copying that file, I
>am unable to login using the old user ids and passwords which were there on
>SCO. Can any one suggest me a way out, without re creating all the ids
>again.
>
>Thanks in Advance
>
>Sunil Sarat
- --------------------------------------------------------------------
For more information on Linux in India visit http://www.linux-india.org/
The Linux India mailing list does not accept postings in HTML format.
------------------------------