[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bsdi - redhat 7.3
On Fri, 30 Aug 2002 15:31:38 +0300 (EAT) Lucas Odemba wrote:
> let me simply the case:
> bsdi uses - /etc/passwd & /etc/master.passwd
> redhat uses - /etc/passwd & /etc/shadow
> now suppose i'm migrating a system from bsdi to redhat, how should i
> handle the the passwd files scenario ?
Something like th script below might help
(note - not tested in full, though the output 'looks' good and should
be a reasonable starting point - no redhat box to test the output on).
I still do believe that *BSD is a much better platform for ISP-style
operations than Linux, but you pick your own poison.
Cheers,
Geert Jan
----
#! /bin/bash
# Conversion tool to convert BSDI's /etc/master.passwd to files that
# can be appended to Redhat's /etc/passwd and /etc/shadow files.
#
# passwd.add and shadow.add to me merged in with existing /etc/passwd
# and /etc/shadow files - please remove duplicates manually!
#
# Password expiration fields hare *NOT* converted -
# left for future study.
#
# The output has not been tested on actual redhat machines -
# YMMV and all that.
#
cat /etc/master.passwd | while IFS=: read login passwd uid gid \
class change expire gecos homedir shell; do
echo "$login":"$passwd":10000:0:99999:7:::1
done > shadow.add
cat /etc/master.passwd | while IFS=: read login passwd uid gid \
class change expire gecos homedir shell; do
echo "$login":x:"$uid":"$gid":"$gecos":"$homedir":"$shell"
done > passwd.add
-----
This is the afnog mailing list, managed by Majordomo 1.94.5
To send a message to this list, e-mail afnog at afnog.org
To send a request to majordomo, e-mail majordomo at afnog.org and put
your request in the body of the message (i.e use "help" for help)
This list is maintained by owner-afnog at afnog.org