Configuring clients users home directory in NIS using Solaris 10

Posted on August 13, 2008

In this setup, my server also serves as the Network Information Service(NIS) server and NFS indirect sharing for user’s home directory.

Checking my server’s NFS shares

Sun Microsystems Inc.   SunOS 5.10      Generic January 2005
-bash-3.00# share
-               /jumpstart   ro,anon=0   “”
-               /installer   ro,anon=0   “”
-               /export/home   rw   “”
-bash-3.00#

My passwd file as an input file for NIS Makefile

-bash-3.00# more /etc/nis_etc/passwd
chris:x:100:1::/home/chris:/bin/bash

Auto_master file

-bash-3.00# more /etc/auto_master
#
# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# ident “@(#)auto_master        1.8     03/04/28 SMI”
#
# Master map for automounter
#
+auto_master
/net            -hosts          -nosuid,nobrowse
#/home          auto_home       -nobrowse
/home           auto.home

Auto_home file. server1 is the NIS and NFS server

-bash-3.00# more /etc/auto_home
#
# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# ident “@(#)auto_home  1.6     03/04/28 SMI”
#
# Home directory map for automounter
#
+auto_home
chris   server1:/export/home/chris

Makefile in /var/yp

…..

all: passwd group hosts ipnodes ethers networks rpc services protocols \
netgroup bootparams aliases publickey netid netmasks c2secure \
timezone auto.master auto.home ageing \
auth.attr exec.attr prof.attr user.attr audit.user
…..

auto.master.time:  $(DIR)/auto_master
-@if [ -f $(DIR)/auto_master ]; then \
sed -e “/^#/d” -e s/#.*$$// $(DIR)/auto_master \
| $(MAKEDBM) - $(YPDBDIR)/$(DOM)/auto.master; \
touch auto.master.time; \
echo “updated auto.master”; \
if [ ! $(NOPUSH) ]; then \
$(YPPUSH) auto.master; \
echo “pushed auto.master”; \
else \
: ; \
fi \
else \
echo “couldn’t find $(DIR)/auto_master”; \
fi

auto.home.time:  $(DIR)/auto_home
-@if [ -f $(DIR)/auto_home ]; then \
sed -e “/^#/d” -e s/#.*$$// $(DIR)/auto_home \
| $(MAKEDBM) - $(YPDBDIR)/$(DOM)/auto.home; \
touch auto.home.time; \
echo “updated auto.home”; \
if [ ! $(NOPUSH) ]; then \

Configure NIS maps using ‘make’

-bash-3.00# pwd
/var/yp
-bash-3.00# /usr/ccs/bin/make

Checking auto.master and auto.home maps

-bash-3.00# ypcat -k auto.master
+auto_master
/home auto.home
/net -hosts             -nosuid,nobrowse
-bash-3.00# ypcat -k auto.home
+auto_home
chris server1:/export/home/chris

Configure /etc/nsswitch.conf automount of your clients

automount:  files nis

» Filed Under Linux/Nix

Comments

One Response to “Configuring clients users home directory in NIS using Solaris 10”

  1. User links about "solaris" on iLinkShare on September 12th, 2008 10:33 am

    [...] | user-saved public links | iLinkShare 3 votesConfiguring clients users home directory in NIS using Solaris 10>> saved by holovaty 1 days ago4 votesSolaris Daylight Saving Time (DST) Update (August 2008)>> [...]

Leave a Reply




  • Recent Comments

    • anonymous: change: copy /mnt/HD_a2/authorized_keys /home/root/.ssh/ ...
    • robinzackrey: hi idol nash aguas!...
    • cybert87: wow! that's amazing... could you please send your source to ...
    • cybert87: hehehe! you're right. What about Voter's ID? is it a Val...
    • anonymous: Thanks for the step-by-step instruction. Rsync is running...

Directory of Personal Blogs
Technology Blogs - BlogCatalog Blog Directory Personal - Top Blogs Philippines Download Day