Setting up NIS

I’m trying to set up a NIS server and NIS client based upon the following howto Quick HOWTO : Ch30 : Configuring NIS - Linux Home Networking

On the server side, I’ve set up a user called “nisuser” with a home directory in “/PA/home/nisuser”. “/PA/home” is exported by NFS.

On the client side I’ve added “/home.nis” which is linked to “ip-address:/PA/home/” in “/etc/auto.master” and “/etc/auto/home”.

When the client (which is a portable linked by a wired network) is started, the startup takes soooooooo long. When I disable NIS on the client side, startup is normal again. When NIS is enabled on the client side, and I log in with “nisuser”, the PC comes back with some errors like “Could not update ICEauthoritity file /PA/home/nisuser/.ICEauthority”.

I assume that /PA/home is not mounted when logging in, although I’ve checked “automounter” on the NIS client.

Can you help?

Ivan

Is this on openSUSE 11.3 machines ? Then it’s probably NFS (causes a 3 minute delay, due to a config fault). that’s bothering you. I cannot say anything about the NIS config. I use NIS a lot, yet have always configured NIS through the Yast modules.
The NFS trouble:
in /etc/nfsmount.conf change the line in red to the line in bold:


# Defaultvers=4
**Defaultvers=3**

Please get back here with results. If you’re interested, I can tell you how I configure NIS/NFS through Yast. AFAICS yours is becoming quite away from default.

I would be very much interested in a howto configure NIS/NFS through Yast. Because I didn’t find any tutorial, I had to use the hard way as explained in the mentioned article. I’m using OpenSuse 11.3.

I’ll give your solution a try, but don’t hesitate to help me with the Yast config.

Did you already have the time to point me to a howto?

Tx - Ivan

Hi Ivan,

Here I am…a busy day. I’m writing right now. Have a little patience, I’m copying the situation from my server and clients. Maybe better in a couple of posts

OK, Ivan, here it is:

On the server side:

Required installs

install yast2-nis-server if not already installed. This provides the Yast2 configuration module for the NIS server.

install yast2-nfs-server if not already installed. This provides the Yast2 configuration module for the NFS server.

These two actions will pull in more packages, when needed. Accept that.

NIS Configuration

Start Yast2, if it was already open, restart it to load the newly installed module(s).
Go Network Services - NIS server
Pick (Re)Configure NIS-masterserver, Next
Fill out the name of the NIS domainname of your choice
Uncheck ‘Host is a NIS client too’
Uncheck ‘Active slave-NIS-server exists’
Uncheck ‘Fast folder distribution’
Choose whether you want to allow users to change their passwd
Open the port in your firewall, if on
Leave other global settings as they are
Click Next

In the next screen check the options ‘group’, ‘host’, ‘passwd’, Next

In the next screen enter netmask - IP’s
0.0.0.0 - 0.0.0.0
255.0.0.0 - 127.0.0.0
(I suddenly realize that this works, but it cannot be right in a business network, first leave it like this, since you’re in a local network)

Click Finish, and here you have your NIS server running

The client side:

Start Yast2 - Network Services - NIS Client
Enter the chosen NIS-domainname
Enter the IP address of your NIS-server machine
Open the port in the firewall, if it’s on.

Done. Now the users existing on the server can login on the client. But that’s not enough, since their /home/$USERNAME is on the server. In the next post I’ll describe the setup of NFS through Yast

Stay tuned :slight_smile:

Setting up NFS

Install yast2-nfs-server, if you have not already done so.

The server side:

Start Yast2 - Network Services - NFS server
Make sure ‘Start’ is checked,
port in firewall, if on, is open, and
‘Activate NFS4’ is unchecked,
‘GSS security’ is off, click Next

Now first add /home to the exported folders, leave all defaults as they are, i.e.
hosts -> *
Options -> rw, root_squash, sync, no_subtree_check
Add other folders you want to export, like you did with /home
Click Finish

The client side:
In the tab NFS-shares:
click Add
Enter IP of the NFS-server machine
click Select on the right of ‘Networkfolder’, pick /home
Mountpoint should be /home as well
Options should be ‘defaults’, click OK
Repeat the above for the other shares you want to be available on the clients

In the tab NFS-settings, uncheck the NFS4 option

Done.

If you have any questions, don’t hesitate. Now that I’ve writen this, 75% of a nice HOWTO is done :stuck_out_tongue:

Edit: If all works without any problem, please also let us know. :wink:

Tx for the excellent howto.

I’ve followed the different steps, but mounted /home of the server to /home/nis on the client side (so that I still can use local users on the client side as long as everything is not working).

When I restart, I see “nisuser” which I’ve defined on the server. When I enter my password, I got the error “Could not update ICEauthoritity file /home/nisuser/.ICEauthority”. Can it be possible that /home/nisuser is not writeable?

Ivan

First you write /home is mounted on /home/nis, then the error shows your nisuser wants his home on /home/nisuser. That’s creating a path problem.
Just keep this in mind: if you enable all, and it does not work, you can always boot into runlevel 3, by entering “init 3” on the options line, login as root, start Yast in the console and disable the NIS client until you got it sorted.

Tx for all your help so far. It’s working perfectly. Excellent howto.

Some remaining questions:

  • NIS is working perfectly when I’m connected to the wired network. How should I enable NIS when I’m connected to the wireless network? (because at login time, the wireless network is not yet connected).

  • 80% of the time my portable is connected to the wired network, 15% to the wireless network (on the couch) and 5% not connected (on the train, at client’s side, …). What would be the best practice when I’m not connected? I was thinking to set up a user “local” on the portable and copy the files I’ll need before disconnecting. Because all documents are on the fileserver, I always had to copy them to the local disk before disconnecting. However, I won’t have access to my mailbox (because this is on the /home dir of the NIS server). Another solution I am considering is syncing the /home/[myuseraccount] of the NIS server to the portable. I will be the only person who will be using the portable disconnected. So no other users will use them disconnected.

  • I have connected to some NFS shares to the fileserver on PC1. I was hoping to find them again when I was connected to PC2. Apparently, I have also to set up those shares on PC2. On my /home[myuseraccount] (which is stored on the NIS server), I have created a nfs-dir to mount those NFS shares. But those shares are not reconnected on PC2.

Tx

Ivan

I would (and have had) create 2 installs on the portable. One configured to use NIS and NFS, the other to use the local /etc/passwd and a local /home.

In my case, I’ve left my laptop out of the network configs. What I need most to be in sync, is my mail. Having IMAP accounts for mail does the trick for me.

I recently set the same thing up here and found that I had the same problem when using Automounter

When I unticked Automounter in Yast and just made sure I had this in /etc/fstab it then worked fine

192.168.0.20:/home /home nfs defaults 0 0

Obviously the 192.168.0.20 should be your own nfs server’s local ip

For local users I changed the default path for home directories in Yast - User and Group Management - Defaults for new users - Path prefix for home directory to /localhome

I did this before I added any local users and the user added when installing Suse I edited it’s home from /home to /localhome

After that local and nis logins both worked fine and system booted normally, no hanging when trying to automount the remote home

I’m sorry to necro this thread, but I have followed your advice and when I try to change the password for the NIS user account, I get the error “yppasswd not running on NIS master”. I have confirmed that it is indeed running. Any advice? This is with OpenSuSE 11.3.

Only just noticed this thread had been added to

allevil669, if you haven’t sorted it already, can I ask exactly what you’re doing when you’re trying to change the nis user’s password?

Including whether you’re trying to do it in Yast on the server or Yast on the client

When I set up a user, I give them a random password and set “Force password change” for the account in YaST. When the user logs in the first time, they are prompted to change their password. When the user tries to change the password, it fails. The error I receive is “yppasswd not running on master server”.

I hope this helps.

Hi ,

i am new to linux,and i setting up a home network,i have planed to set up a Suse 11 NIS Server and suse 12.3 clients.i want to know whether i can use windows clients for authentication through the nis server.

On 07/02/2013 06:06 AM, kavindasuse wrote:
> i am new to linux,and i setting up a home network,i have planed to set
> up a Suse 11 NIS Server and suse 12.3 clients.i want to know whether i
> can use windows clients for authentication through the nis server.

-=WELCOME=- new poster and new Linux user…

ok, so SUSE is in the name of both operating systems you are
using…but, the two systems are not the same (they are similar in
that openSUSE is the basis on which SUSE Linux Enterprise Server
[aka: SLES] is built)…

they are different in that one (SLES) is a commercial product
distributed by suse.com and supported by through their forums at
http://forums.suse.com/; and the other an open source community built
system distributed through software.opensuse.org and supported via
this forum, forums.opensuse.org

they are also technically different in many ways (basically, openSUSE
has much newer [read: less tested] applications and subsystems, while
SLES is well tested, stable, stable, stable, dependable, etc etc etc

and, the question you asked is a SLES question…a question i can
guess at (i think the answer is ‘yes’) but having never setup or
operated any SLES server i can only guess (and such is the experience
of most in this forum)…on the other hand, there may be a few in
this forum who know (authoritatively/experienced) the correct answer
and can answer you next question (how to do that?)…

but, the BEST place for your question is in http://forums.suse.com

the user ID and password for the two different forums is the same…

again, welcome.


dd