Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Nis client woes on a Solaris 10 machine

520 views
Skip to first unread message

Thorin

unread,
May 8, 2009, 5:45:17 AM5/8/09
to
Hi, I'm trying to setup a new NIS client so I followed these steps:

- created the /etc/defaultdomain file

- created the /etc/auto_home and /etc/auto_master files


root@miso422:/> cat /etc/auto_home | grep -v ^#
+auto_home

root@miso422:/> cat /etc/auto_master | grep -v ^#
+auto_master

root@miso422:/> cat /etc/nsswitch.conf | grep -v ^#

passwd: files nis
group: files nis
hosts: files nis dns
networks: files
protocols: files
rpc: files
ethers: files
netmasks: files
bootparams: files
publickey: files
netgroup: files
automount: files nis
aliases: files
services: files
sendmailvars: files


but when I'm issuing the 'ypinit -c' command I get these errors:

root@miso422:/> ypinit -c

In order for NIS to operate sucessfully, we have to construct a list of the
NIS servers. Please continue to add the names for YP servers in order of
preference, one per line. When you are done with the list, type a
<control D>
or a return on a line by itself.
next host to add: miso431
next host to add: miso028
next host to add:

The current list of yp servers looks like this:

miso431
miso028

Is this correct? [y/n: y] y
svcadm: Pattern 'network/nis/server:default' doesn't match any instances
svcadm: Pattern 'network/nis/xfr:default' doesn't match any instances
svcadm: Pattern 'network/nis/passwd:default' doesn't match any instances
svcadm: Pattern 'network/nis/update:default' doesn't match any instances

I tried to put up some of those services but almost of them gave errors...

root@miso422:/> svcs -a | grep network/nis
disabled 11:20:53 svc:/network/nis/client:default
root@miso422:/> svcadm enable /network/nis/client:default
root@miso422:/> svcadm enable network/nis/xfr:default
svcadm: Pattern 'network/nis/xfr:default' doesn't match any instances
root@miso422:/> svcadm enable network/nis/passwd:default
svcadm: Pattern 'network/nis/passwd:default' doesn't match any instances
root@miso422:/> svcadm enable network/nis/update:default
svcadm: Pattern 'network/nis/update:default' doesn't match any instances


I tried to search on Google (Groups and web), Sunsolve but just found
out some links which proved to be unuseful.. In one of these,
http://forums.sun.com/thread.jspa?threadID=5165458 they were talking
about two packages, SUNypu and SUNWypr which aren't either instakked on
the master.. any tips/ideas/RTFM's ?

Martin Paul

unread,
May 8, 2009, 6:15:20 AM5/8/09
to
Thorin wrote:
> Is this correct? [y/n: y] y
> svcadm: Pattern 'network/nis/server:default' doesn't match any instances
> svcadm: Pattern 'network/nis/xfr:default' doesn't match any instances
> svcadm: Pattern 'network/nis/passwd:default' doesn't match any instances
> svcadm: Pattern 'network/nis/update:default' doesn't match any instances

Looking at the code of ypinit (it's a shell script), you'll see that it
tries to *disable* these services with svcadm at that point. This makes
sense, as they are only needed for a NIS server, not a client.

Maybe you can just ignore the messages? The NIS client setup should be
complete after that step. Test with "ypwhich" and "ypcat -k auto.home".

mp.
--
SysAdmin | Institute of Scientific Computing, University of Vienna
PCA | Analyze, download and install patches for Solaris
| http://www.par.univie.ac.at/solaris/pca/

Thorin

unread,
May 8, 2009, 6:33:42 AM5/8/09
to
Martin Paul ha scritto:

> Thorin wrote:
>> Is this correct? [y/n: y] y
[..]

> Looking at the code of ypinit (it's a shell script), you'll see that it
> tries to *disable* these services with svcadm at that point. This makes
> sense, as they are only needed for a NIS server, not a client.
>
> Maybe you can just ignore the messages? The NIS client setup should be
> complete after that step. Test with "ypwhich" and "ypcat -k auto.home".
>
> mp.
Hi Martin, thanks for your reply but this doesn't seem to be working,
unfortunately..


root@miso422:/> ypwhich
ypwhich: can't communicate with ypbind

and the same stands for the ypcat command.. I must have been missing
something.. Some other network/nis service, maybe?


j.go...@mobilcom.de

unread,
May 8, 2009, 7:06:15 AM5/8/09
to
Thorin <tho...@bofhland.org> wrote:
[...]

> The current list of yp servers looks like this:
> miso431
> miso028
[...]

Are those defined in /etc/inet/hosts?

Jens

Michael Tosch

unread,
May 8, 2009, 7:30:32 AM5/8/09
to

I.e. ensure that this works:

ping miso431
ping miso028

And ensure this:

svcs | grep nis
online Date svc:/network/nis/client:default

domainname
your.domain.name

--
echo imhcea\.lophc.tcs.hmo |
sed 's2\(....\)\(.\{5\}\)2\2\122;s1\(.\)\(.\)1\2\11g;1s;\.;::;2'

Thorin

unread,
May 8, 2009, 9:15:34 AM5/8/09
to
j.go...@mobilcom.de ha scritto:
Yes, they are...

bash-3.00# egrep 'miso431|miso028' /etc/hosts
# 10.22.26.250 miso028
# 10.22.24.251 miso028 miso431
10.254.48.31 miso431 miso431_nb mailhub
10.254.48.29 miso028

and, to answer Michael too:

bash-3.00# for i in 431 028; do ping miso$i; done
miso431 is alive
miso028 is alive


the network/nis/client svc is actually disabled, I think itgets disables
when I'm trying to run ypinit while domainname gives the right output.
Don't really know where to look further..

Roland Titze

unread,
May 8, 2009, 9:33:59 AM5/8/09
to
On 8 Mai, 15:15, Thorin <tho...@bofhland.org> wrote:

Did you tried the all hints from

http://docs.sun.com/app/docs/doc/816-4556/abtrbl-28251?a=view

?

--
HTH
Roland

Bartek

unread,
May 10, 2009, 4:19:12 PM5/10/09
to
Thorin wrote:

> svcadm: Pattern 'network/nis/server:default' doesn't match any instances
> svcadm: Pattern 'network/nis/xfr:default' doesn't match any instances
> svcadm: Pattern 'network/nis/passwd:default' doesn't match any instances
> svcadm: Pattern 'network/nis/update:default' doesn't match any instances
>

It looks like NIS server package isn't installed... But it shouldn't be
necessary to run on host that is client only.

Thorin

unread,
May 11, 2009, 6:27:53 AM5/11/09
to
Roland Titze ha scritto:

> Did you tried the all hints from
>
> http://docs.sun.com/app/docs/doc/816-4556/abtrbl-28251?a=view
>
> ?

Hi Roland, thanks for your reply... well, I already tried the most of
them, e.g. I mean the network/nis/client is online, the domainname is
the right one, I can see a /var/yp/binding/domainname directory and the
ypservers file is pointing to the right list of servers, the
/etc/nsswitch.conf file seems to be pointing to the right places..

# grep -v ^# /etc/nsswitch.conf

passwd: files nis
group: files nis
hosts: files nis dns
networks: files
protocols: files
rpc: files
ethers: files
netmasks: files
bootparams: files
publickey: files
netgroup: files
automount: files nis
aliases: files
services: files
sendmailvars: files

now I'm seeing all the NIS users' homes have been created but what
still leaves me troubled is seeing the network/nis/client service gets
disabled whenever I'm trying to run ypinit -c.. do you suggest I could
simply ignore this and go on?
TIA.

Thorin

unread,
May 11, 2009, 6:28:54 AM5/11/09
to
Bartek ha scritto:
So would it be safe to simply ignore these warning?

Gary Mills

unread,
May 11, 2009, 9:10:41 AM5/11/09
to
In <gu8uj8$79e$1...@news.motzarella.org> Thorin <tho...@bofhland.org> writes:

>Roland Titze ha scritto:

>> Did you tried the all hints from
>>
>> http://docs.sun.com/app/docs/doc/816-4556/abtrbl-28251?a=view
>>

>Hi Roland, thanks for your reply... well, I already tried the most of
>them, e.g. I mean the network/nis/client is online, the domainname is
>the right one, I can see a /var/yp/binding/domainname directory and the
>ypservers file is pointing to the right list of servers, the
>/etc/nsswitch.conf file seems to be pointing to the right places..

For an NIS client, all that you need to do is to set the domain
name in the /etc/defaultdomain file and reboot. After the reboot,
run `ypwhich' and `ypwhich -m' to confirm that it worked.

--
-Gary Mills- -Unix Support- -U of M Academic Computing and Networking-

Roland Titze

unread,
May 12, 2009, 8:10:12 AM5/12/09
to
On 11 Mai, 15:10, Gary Mills <mi...@cc.umanitoba.ca> wrote:

I think creating the file /etc/defaultdomain and reboot is not enough
to setup a NIS client in Solaris 10. How the NIS client should find
the NIS server without an appropriate configuration?
I think you have to perfom the following steps:

- create file /etc/defaultdomain
- add your NIS servers to file /etc/inet/hosts
- call "ypinit -c" and provide the list of your NIS servers
- call "svcadm enable network/nis/client"
- init 6

I have tested these steps on one of my lab boxes.
The NIS client functionality seems to work.
The command "ypinit -c" reports also svcadm error messages
(I don't know why).
Further I would expect that the file /etc/nsswitch.conf contains
nis entries but this is not the case?

--
Roland

Martin Paul

unread,
May 12, 2009, 10:01:48 AM5/12/09
to
Roland Titze wrote:
> I think creating the file /etc/defaultdomain and reboot is not enough
> to setup a NIS client in Solaris 10. How the NIS client should find
> the NIS server without an appropriate configuration?

Via broadcast. If the NIS client startup script can't find the ypservers
file in /var/yp/binding/$domain, it will run ypbind with the -broadcast
option instead.

> Further I would expect that the file /etc/nsswitch.conf contains
> nis entries but this is not the case?

The nsswitch configuration is on you, ypinit doesn't touch
/etc/nsswitch.conf:

$ grep nsswitch /usr/sbin/ypinit
$

The simplest way is to copy nsswitch.nis to nsswitch.conf, but if don't
provide all of the standard entries for the various NIS tables like
"services", "protocols" etc. this can have strange side-effects, as the
default nsswitch.nis will look in NIS *only* (not files) in certain cases.

Richard B. Gilbert

unread,
May 12, 2009, 11:42:27 AM5/12/09
to
Martin Paul wrote:
> Roland Titze wrote:
>> I think creating the file /etc/defaultdomain and reboot is not enough
>> to setup a NIS client in Solaris 10. How the NIS client should find
>> the NIS server without an appropriate configuration?
>
> Via broadcast. If the NIS client startup script can't find the ypservers
> file in /var/yp/binding/$domain, it will run ypbind with the -broadcast
> option instead.
>
>> Further I would expect that the file /etc/nsswitch.conf contains
>> nis entries but this is not the case?
>
> The nsswitch configuration is on you, ypinit doesn't touch
> /etc/nsswitch.conf:
>
> $ grep nsswitch /usr/sbin/ypinit
> $
>
> The simplest way is to copy nsswitch.nis to nsswitch.conf, but if don't
> provide all of the standard entries for the various NIS tables like
> "services", "protocols" etc. this can have strange side-effects, as the
> default nsswitch.nis will look in NIS *only* (not files) in certain cases.
>
> mp.

For more than you ever wanted to know about setting up NIS:
http://www.rodrickbrown.com/docs/nis_howto.html

Thorin

unread,
May 14, 2009, 3:27:46 AM5/14/09
to
Gary Mills ha scritto:

> For an NIS client, all that you need to do is to set the domain
> name in the /etc/defaultdomain file and reboot. After the reboot,
> run `ypwhich' and `ypwhich -m' to confirm that it worked.

Well, I just rebooted it and it seems to be working...

root@miso422> ypwhich
miso028


root@miso422> ypwhich -m
ypservers miso431
passwd.byname miso431
passwd.byuid miso431
group.byname miso431
hosts.byname miso431
hosts.byaddr miso431
ipnodes.byname miso431
publickey.byname miso431
ipnodes.byaddr miso431
ethers.byaddr miso431
ethers.byname miso431
group.bygid miso431
networks.byname miso431
networks.byaddr miso431
rpc.bynumber miso431
services.byservicename miso431
protocols.bynumber miso431
protocols.byname miso431
services.byname miso431
netgroup.byuser miso431
netgroup.byhost miso431
netgroup miso431
bootparams miso431
mail.aliases miso431
mail.byaddr miso431
netid.byname miso431
netmasks.byaddr miso431
timezone.byname miso431
auto.master miso431
auto.home miso431
exec_attr miso431
prof_attr miso431
auth_attr miso431
user_attr miso431
audit_user miso431
ageing.byname miso431

Thanks!

Thorin

unread,
May 14, 2009, 3:32:59 AM5/14/09
to
Roland Titze ha scritto:

> I think creating the file /etc/defaultdomain and reboot is not enough
> to setup a NIS client in Solaris 10. How the NIS client should find
> the NIS server without an appropriate configuration?
> I think you have to perfom the following steps:
>
> - create file /etc/defaultdomain
> - add your NIS servers to file /etc/inet/hosts
> - call "ypinit -c" and provide the list of your NIS servers
> - call "svcadm enable network/nis/client"
> - init 6
>
> I have tested these steps on one of my lab boxes.
> The NIS client functionality seems to work.
> The command "ypinit -c" reports also svcadm error messages
> (I don't know why).
> Further I would expect that the file /etc/nsswitch.conf contains
> nis entries but this is not the case?

Roland, those were exactly the steps I performed except but rebooting
the machine: what leaved me strange was seeing the network/nis/client
being disabled whenever I was trying to run 'ypinit -c' but now I'm
quite sure this behaviour was happening since I didn't do a shutdown.
Now it seems to be working perfectly and I wish to thank you all for
your precious help.

Thorin

unread,
May 14, 2009, 3:35:20 AM5/14/09
to
Martin Paul ha scritto:

> Roland Titze wrote:
>> I think creating the file /etc/defaultdomain and reboot is not enough
>> to setup a NIS client in Solaris 10. How the NIS client should find
>> the NIS server without an appropriate configuration?
>
> Via broadcast. If the NIS client startup script can't find the ypservers
> file in /var/yp/binding/$domain, it will run ypbind with the -broadcast
> option instead.
>
>> Further I would expect that the file /etc/nsswitch.conf contains
>> nis entries but this is not the case?
>
> The nsswitch configuration is on you, ypinit doesn't touch
> /etc/nsswitch.conf:
>
> $ grep nsswitch /usr/sbin/ypinit
> $
>
> The simplest way is to copy nsswitch.nis to nsswitch.conf, but if don't
> provide all of the standard entries for the various NIS tables like
> "services", "protocols" etc. this can have strange side-effects, as the
> default nsswitch.nis will look in NIS *only* (not files) in certain cases.
That was one of the steps I previously performed :-), I mean copying
nsswitch.nis to nsswitch.conf and modifying it with Vi to add all the
necessaries 'nis' entries. Anyway everything seems to be working, now so
thank to you too for your help.

Thorin

unread,
May 14, 2009, 3:35:56 AM5/14/09
to
Richard B. Gilbert ha scritto:

> For more than you ever wanted to know about setting up NIS:
> http://www.rodrickbrown.com/docs/nis_howto.html

WOW, added to my bookmarks, thanks :)

0 new messages