As part of OpenSolaris 2008.05 installation, Caiman installer automatically configures your ethernet card  to provide a dynamic IP address. This is perfectly fine if you are working from your laptop.

However, if you, like me installed it on your workstation like Sun Ultra 40 then you might want to do necessary things like assigning a static IP address with NIS authentication enabled etc to transition the system as a developer workstation. Now that I have tried out OpenSolaris 2008.05 LiveCD for more than 2 weeks now, I guess I am now ready to make OpenSolaris 2008.05 as my default OS. If you haven't yet, you might wanna download a copy from here

So, here is how I went ahead with this transition

- Disable Network AutoMagic(NWAM) service and enable traditional networking service

svcadm enable physical:default 

svcadm disable physical:nwam

-  Now, you need to configure the static IP address for your ethernet interface. You could do this by using the network configuration GUI - 'System->Administration->Network GUI window to configure this as shown here

Note: I am assuming that you know the IP address and the default gateway that you need to provide here. If not, you might want to talk to your Network administrator before you attempt this.

- Now, I will restart all network services by doing some thing like

 svcadm restart milestone/network


Now, I will move ahead and configure NIS for my system. Here is how it
worked for me

- Setup your domain name of your current network. NIS server need to reside within this domain as well.  So, let us save the current domain name of your network to /etc/defaultdomain file.

    pfexec domainname <name here> 

   pfexec domainname > /etc/defaultdomain

For example,

    pfexec domainname sfbay.sun.com

    pfexec domainname  > /etc/defaultdomain

- Copy /etc/nsswitch.nis to /etc/nsswitch.conf

    pfexec cp /etc/nsswitch.nis /etc/nsswitch.conf

- Configure NIS Services

    pfexec ypinit -c

This above command will walk you through and ask you to provide NIS server IP addresses etc. and then bind the configured NIS server.

    pfexec /usr/lib/netsvc/yp/ypbind -broadcast

- Finally, enable NIS service and restart all network services..

    svcadm enable nis/client

    svcadm restart milestone/network

- Now, you should be able to verify if NIS is working on your system by doing something like

    ypcat -k passwd -> should return a whole bunch of NIS user names within your domain.

That is all there to do to translate a OpenSolaris system running in DHCP to a static IP address with NIS enabled



Comments:

Hi Sriram. I am new to solaris from the windows world. I can't seem to find any documentation on how to create a NIS or NIS+ server. Everything points to a client. Can an opensolaris server be configured into a NIS server? If so how? Thx, your blog has been invaluable.

Posted by Vic on June 08, 2008 at 09:24 AM PDT #

Hi
Setting up a NIS Server is very easy. If you are using Solaris 10 or OpenSolaris, the below link will be very useful for you
http://www2.petervg.nl/cgi-bin/docs.cgi?a=read&doc=103

hope this helps

Posted by Sriram Natarajan on June 09, 2008 at 03:43 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

This blog copyright 2008 by natarajan