Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Feb 1997 11:00:12 +0100 (MET)
From:      W.Belgers@nl.cis.philips.com (Walter Belgers)
To:        freebsd-hackers@freebsd.org
Subject:   Re: NIS/uids
Message-ID:  <199702051000.LAA27316@giga.lss.cp.philips.com>
In-Reply-To: <199702042306.QAA13339@phaeton.artisoft.com> from Terry Lambert at "Feb 4, 97 04:06:53 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert writes:
> > > The problem now is that the security on my system has become dependant
> > > on that of the NIS server. If I am root on the NIS server I can change
> > > the uid of "user" into any user including root and make use of it on my
> > > system.
> > 
> It makes sense to me that "sensitive" user and group ID's perhaps
> should not be honored when they come in via NFS... ie: user root
> or bin, etc., or group bin or kmem.

This has turned out to become a discussion about whether or not you
should trust your NIS server, but that's not what I wanted to know.
Let's assume I do not trust the uid's coming from the NIS server but I
still do want to use NIS (for passwd/homedir/gecos/whatever).

Why does FreeBSD give me troubles when I override the uid in the local
password file?

a) taking uid from NIS:
[/] root@giga# grep john /etc/master.passwd
+john:::::0:0:John Doe:/home/john:/usr/local/bin/tcsh
[/] root@giga# ypmatch john passwd
john::1234:1234:John Doe:/home/john:/bin/tcsh
[/] root@giga# su - john
> id
uid=1234(john) gid=1234 groups=1234
> from
>From walter Wed Feb  5 09:49:57 1997
>


b) overriding the uid:
[/] root@giga# grep john /etc/master.passwd
+john::1234:1234::0:0:John Doe:/home/john:/usr/local/bin/tcsh
[/] root@giga# ypmatch john passwd
john::1234:1234:John Doe:/home/john:/bin/tcsh
[/] root@giga# su - john
> id
uid=1234 gid=1234 groups=1234
> from
from: no password file entry for you.
>


Walter.
-- 
Ir. W.H.B. Belgers, Internet Security Specialist        phone: +31 40 2782753
Origin IT Syst.Man. /Nederland bv, Bldg VN-513   email:   fax: +31 40 2784697
P.O. Box 218, 5600 MD Eindhoven, Netherlands     W.Belgers@nl.cis.philips.com
non-business-email: walter@giga.nl   -web: http://www.IAEhv.nl/users/gigawalt



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