Re: NIS Server with amd.home

2003-01-08 Thread Mike Hogsett

> Hey,

Hi.

> I'm getting ready to setup a NIS server for a LAN, and I'd really like
> to use FreeBSD again.  However, the last time I did this with FreeBSD
> (4.6, so not that long ago), I couldn't get the server to build a map
> for the home dirs.  I tried an awk script in the Makefile that I saw
> online, but that didn't help.  It seemed like it just wouldn't build the
> map.  The only way I could get it to work was to create an amd.home with
> all of the users in it and put it on all of the client machines... This
> was too ugly.

Indeed.

> Can anyone help?

Perhaps.

This may or may not help, but here is the Makefile from /var/yp on our NIS
primary.  You'll likely need to scroll down and extract our amd.home rules
from it and integrate that into yours.

After that is the rc.conf entries for amd 

Good luck.

- Mike

#
# Makefile for the NIS databases
#
# $FreeBSD: src/usr.sbin/ypserv/Makefile.yp,v 1.28.2.3 2001/05/18 18:28:02 gshapiro 
Exp $
#
# This Makefile should only be run on the NIS master server of a domain.
# All updated maps will be pushed to all NIS slave servers listed in the
# /var/yp/ypservers file. Please make sure that the hostnames of all
# NIS servers in your domain are listed in /var/yp/ypservers.
#
# This Makefile can be modified to support more NIS maps if desired.
#

# If this machine is an NIS master, comment out this next line so
# that changes to the NIS maps can be propagated to the slave servers.
# (By default we assume that we are only serving a small domain with
# only one server.)
#
#NOPUSH = "False"

# If you want to use a FreeBSD NIS server to serve non-FreeBSD clients
# (i.e. clients who expect the password field in the passwd maps to be
# valid) then uncomment this line. This will cause $YPDIR/passwd to
# be generated with valid password fields. This is insecure: FreeBSD
# normally only serves the master.passwd maps (which have real encrypted
# passwords in them) to the superuser on other FreeBSD machines, but
# non-FreeBSD clients (e.g. SunOS, Solaris (without NIS+), IRIX, HP-UX,
# etc...) will only work properly in 'unsecure' mode.
# 
UNSECURE = "True"

# The following line encodes the YP_INTERDOMAIN key into the hosts.byname
# and hosts.byaddr maps so that ypserv(8) will do DNS lookups to resolve
# hosts not in the current domain. Commenting this line out will disable
# the DNS lookups.
B=-b

# Normally, the master.passwd.* maps are guarded against access from
# non-privileged users. By commenting out the following line, the YP_SECURE
# key will be removed from these maps, allowing anyone to access them.
S=-s

# These are commands which this Makefile needs to properly rebuild the
# NIS databases. Don't change these unless you have a good reason. Also
# be sure not to place an @ in front of /usr/bin/awk: it isn't necessary
# and it'll break everything in sight.
#
AWK = /usr/bin/awk
RM  = @/bin/rm -f
MV  = @/bin/mv -f
RMV  = /bin/mv -f
RCAT = /bin/cat
CAT = @$(RCAT)

UPDATE_DOMAIN = csl.sri.com

MKDB = /usr/sbin/yp_mkdb
DBLOAD = $(MKDB) -m `hostname`
MKNETID = /usr/libexec/mknetid
NEWALIASES = /usr/bin/newaliases
YPPUSH = /usr/sbin/yppush
.if !defined(UPDATE_DOMAIN)
DOMAIN = `/bin/domainname`
.else
DOMAIN = $(UPDATE_DOMAIN)
.endif
REVNETGROUP = /usr/libexec/revnetgroup
TMP = `echo $@.`

# It is advisable to create a separate directory to contain the
# source files used to generate your NIS maps. If you intend to
# support multiple domains, something like /src/dir/$DOMAIN
# would work well.
YPSRCDIR = /usr/local/nis/$(UPDATE_DOMAIN)
.if !defined(YP_DIR)
YPDIR = /var/yp
.else
YPDIR = $(YP_DIR)
.endif
YPMAPDIR = $(YPDIR)/$(DOMAIN)

# These are the files from which the NIS databases are built. You may edit
# these to taste in the event that you wish to keep your NIS source files
# seperate from your NIS server's actual configuration files. Note that the
# NIS passwd and master.passwd files are stored in /var/yp: the server's
# real password database is not used by default. However, you may use
# the real /etc/passwd and /etc/master.passwd files by:
#
#
# - invoking yppasswdd with `-t /etc/master.passwd' (yppasswdd will do a
#   'pwd_mkdb' as needed if /etc/master.passwd is thus specified).
# - Specifying the location of the master.passwd file using the
#   MASTER_PASSWD variable, i.e.:
#
#   # make MASTER_PASSWD=/path/to/some/other/master.passwd
#
# - (optionally): editing this Makefile to change the default location.
#
# To add a user, edit $(YPDIR)/master.passwd and type 'make'. The raw
# passwd file will be generated from the master.passwd file automagically.
#
ETHERS= $(YPSRCDIR)/ethers # ethernet addresses (for rarpd)
BOOTPARAMS= $(YPSRCDIR)/bootparams # for booting Sun boxes (bootparamd)
HOSTS = $(YPSRCDIR)/hosts
NETWORKS  = $(YPSRCDIR)/networks
PROTOCOLS = $(YPSRCDIR)/protocols
RPC   = $(YPSRCDIR)/rpc
SERVICES  = $(YPSRCDIR)/services
GROUP = $(YPSRCDIR)/group
ALIASES   = $(YPSRCDIR)/mail/aliases
NETGROUP  = $(YPSRCDIR)/netgroup
PASSWD

NIS Server with amd.home

2003-01-08 Thread Eric Osterweil
Hey,

I'm getting ready to setup a NIS server for a LAN, and
I'd really like to use FreeBSD again.  However, the
last time I did this with FreeBSD (4.6, so not that
long ago), I couldn't get the server to build a map
for the home dirs.  I tried an awk script in the
Makefile that I saw online, but that didn't help.  It
seemed like it just wouldn't build the map.  The only
way I could get it to work was to create an amd.home
with all of the users in it and put it on all of the
client machines... This was too ugly.

Can anyone help?

TIA,

Eric

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message