Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Oct 2005 14:04:43 -0400
From:      Bill Vermillion <bv@wjv.com>
To:        freebsd-hackers@freebsd.org
Subject:   Re: system password's file --failed
Message-ID:  <20051018180443.GC62265@wjv.com>
In-Reply-To: <20051018120048.9279F16A41F@hub.freebsd.org>
References:  <20051018120048.9279F16A41F@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Throwing caution to the wind and speaking without thinking about
what was being said on Tue, Oct 18, 2005 at 12:00 ,
freebsd-hackers-request@freebsd.org blurted this:

> Send freebsd-hackers mailing list submissions to

> Date: Tue, 18 Oct 2005 12:17:54 -0000 (UTC)
> From: iwan@staff.usd.ac.id
> Subject: Re: system password's file --failed
> To: freebsd-hackers@freebsd.org

> Hi all,
> I failed this steps. FreeBSD cannot recognized my username.
> I will try it again. Have anybody another solution ??
> Thanks before.
> regards.
> 

If you used those steps no wonder it failed.  shadow is NOT at all
like master.passwd.

...

> >> I would suggest you to try the below and make sure this
> >> works

> >> 1 ) Install a new freebsd server
> >> 2 ) create a user on your linux machine say with
> >> username
> >> freebsd and some
> >> password
> >> 3 ) now copy the data in your /etc/passwd file of linux
> >> machine to freebsd
> >> machine

And the /etc/passwd in Linux and System V [or all the old Unix
systems] is not the same format as in BSD.

> >> 4 ) Also copy the /etc/shadow file to freebsd server and
> >> renmae it as
> >> /etc/master.passwd

I'm surprised you could even log in with that.

> >> 5 ) Also copy /etc/groups

Groups are used differently by default in BSD.  Don't blindly apply
Linux knowledge to BSD>

> >> 6 ) Now try to login to freebsd machine with the new
> >> user
> >> created on the
> >> linux machine.

> >> Note : Please create a copy of the original file on
> >> freebsd machine before
> >> you change the real file

And DO NOT LOG OUT - as you might not be able to log in again.

Look at the file formats of BSD and Linux.  You'll note extra
fields.

If you have separate passwd and shadow on Linux, you need to 
manipulate those before putting in BSD.

You can simply cut and paste [using Unix cut/paste not a gui thing]
to add the fields and put the encrypted portion of shadow where it
belongs.  And put that in master.passwd and USE VIPW - which will
check the file.  If master.passwd is correct when you exit vipw
it will build /etc/passwd.

I don't recall the script the other person posted, but the
directions above are really wrong.


Bill
-- 
Bill Vermillion - bv @ wjv . com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051018180443.GC62265>