Gentoo Archives: gentoo-server

From: Jon Ferguson <jon@×××××××××.edu>
To: gentoo-server@l.g.o
Subject: Re: [gentoo-server] Quick NIS lesson
Date: Sat, 19 Jun 2004 12:00:44
Message-Id: 40D42AE3.2060506@media.mit.edu
In Reply to: [gentoo-server] Quick NIS lesson by Jason Qualkenbush
1 in modern versions of nis you need to edit nsswitch.conf and turn on
2 compatibility mode to use the "+" syntax in /etc/passwd and /etc/group.
3
4 try changing the passwd entry in /etc/nsswitch.conf to look like this:
5
6 passwd: compat
7
8 (no need to restart nis, changes take effect immediately)
9
10 the finger command can be useful to check if things are working the way
11 you expect:
12
13 finger myusername
14 finger (someothervalidnisusername)
15
16 hope that helps.
17
18 cheers,
19 jon
20
21
22 Jason Qualkenbush wrote:
23
24 >I'll get right into my problem. I have an internal web server that I
25 >don't want anyone but me to log into. However, this webserver needs to
26 >use NIS/NFS so it can automount users home directories for public_html.
27 >I tried to restrict people from logging in using these lines in passwd:
28 >
29 >+myusername::::::
30 >+:!!:+:+:+:+:/bin/false
31 >
32 >Shouldn't that allow "myusername" to log in and deny anyone else? This
33 >really is more of a "Should I be doing it this way?" kind of question I
34 >guess.
35 >
36 >-Jason
37 >
38 >