Aici veti gasi detalii tehnice despre cum se pot realiza configurari software+ hardware.
Here you can find tehnical details about software/hardware configuration.

marți, 3 iunie 2008

Migraea Userilor din Linux in FreeBSD

I managed migrate the accounts, without a hitch (so far so good
anyway). Here is a step by step account of what i did, for future
reference:

1) Created an NFS share on the linux machine, which was exported to the
freebsd machine with the no_root_squash option. The entry in
/etc/exports was:

/home <freebsd_machine>(ro,no_root_squash)

2) Copied the home directories accross with the tar command given by Konrad:

tar cCf /path/to/nfs/mount - . | tar xvpCf /path/to/new/home/dirs -

The following 5 steps where copied from:
http://www.openbsd.org/faq/faq9.html#passwd

3) Merged /etc/passwd and /etc/shadow from the linux machine, using
unshadow, part of the john the ripper suite - see
http://www.openwall.com/john/ (a ports package is available)

unshadow /etc/passwd /etc/shadow > linux_passwd

4) Next, I converted the results to the /etc/master.passwd format using awk:

# cat linux_passwd | awk -F : '{printf("%s:%s:%s:%s::0:0:%s:%s:%s\n", \
> $1,$2,$3,$4,$5,$6,$7); }' > new_passwd

5) Now I edited new_passwd, removing any of the system account entries
(root, daemon etc) and any of the user accounts that overlapped with
user accounts already on the freebsd machine.

6) Merge new_passwd with /etc/master.passwd on the freebsd box
# cat new_passwd >> /etc/master.passwd

7) And then generate the password database files (/etc/spwd.db and
/etc/pwd.db), and the normal /etc/passwd file.
# pwd_mkdb -p /etc/master.passwd

8) On both the linux box and the freebsd one, each user has its own
group (of the same name of the user). For any users migrated from the
linux machine to the bsd one, I also copied the corresponding entries
from linux:/etc/group to freebsd:/etc/group. I hadn't seen anyone
suggest doing this, but I can't see why it would be problem, and it
seems to work fine.

Niciun comentariu:

Map


Visitor Map