Migrating user accounts from linux to freebsd

2004-04-08 Thread Brian Sheehan
Hi,

I've recently done a fresh installation of freebsd 4.9, and now I want 
to migrate the user accounts from a redhat 9 machine to the new freebsd 
machine, and hopefully keep logins and passwords unchanged. Is this 
possible?

Also, what would be the best way to go about moving the users' home 
directories from the linux box to the freebsd one?
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Migrating user accounts from linux to freebsd

2004-04-20 Thread Brian Sheehan
Lowell Gilbert wrote:

Konrad Heuer [EMAIL PROTECTED] writes:


On Thu, 8 Apr 2004, Brian Sheehan wrote:


I've recently done a fresh installation of freebsd 4.9, and now I want
to migrate the user accounts from a redhat 9 machine to the new freebsd
machine, and hopefully keep logins and passwords unchanged. Is this
possible?
It is possible, but you need to write a shell or perl script to combine
the user entries in the Linux files /etc/passwd and /etc/shadow 
[...]

There's an awk script in the passwd(5) manual for this purpose.
Hi all,

Thanks to Lowell  Konrad for their help.

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.

that's it!

thanks again for the help,

Brian
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


ports packages: problems with fetch

2004-07-26 Thread Brian Sheehan
Hi,
I've recently been having problems with the ports/packages system on a 
newly installed 4.10-RELEASE FreeBSD machine. Some port/package 
installations would fail, making it seem that a large proportion of 
package repositories where out of date, and that only a small number 
were up to date. I more or less solved the problem, but I'm posting this 
here as it took quite a lot of fiddling to  overcome it, and it took me 
a while to cop what the actual problem was: a dodgy proxy server between 
me and the freeBSD repositories.

Some port / package installations would fail with:
fetch: 
ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/name-of-port: 
size unknown

If the file were fetched manually, the same size unknown warning would 
be displayed, but fetch would actually go ahead and download the file 
anyway. If the file were placed in /usr/ports/distfiles, installation 
would sometimes work. In cases where it didn't, an inspection of the 
downloaded .tar.gz file with cat showed it to in fact contain a http 
error response from the proxy server I was using. Fetching the same 
files from a machine outside the firewall worked perfectly.

Solution:
I tried a different proxy server in the organisation where I work - it 
is administered by a different department than the one I was using, and 
seems to work reliably with fetch.

Does this sound like a reasonable explanation to people? If so, which 
proxy servers are know to be problematic?

Brian
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]