cancel
Showing results for 
Search instead for 
Did you mean: 

NIS Client Setup

admin1979
Super Advisor

NIS Client Setup


Hello,

We are in a process to setup nis client on our Linux Host. NIS Server is already in place. And we did try to
setup NIS Client using Yast2 and it seems it has setup properly. We could manage to login onto the NIS Client system using
our global userid. But additionally our requirement is to be able to land into the local home directory of that user.
It means we do not wish the user to land onto his global home directory. Instead he should be able to land into something like
/localhome/username directory.
Example.

User : mac logs onto the NIS client host using his global password. NIS Client lets him in and he then should land onto
/localhome/mac directory. Is there any way to setup in such a way that the users home directory (mac) will get automatically
created when he logs in for the first time??
Thanx in advance.

Admin
3 REPLIES
Steven Schweda
Honored Contributor

Re: NIS Client Setup

What is "his global home directory"? Will he
ever use it, if every client puts him into
some local home directory?

What does the NIS passwd map say his home
directory is?

> Is there any way to setup [...]

I doubt that there's a good, easy way. Who
has permission to create a directory in
"/localhome"? Not a normal user, I hope.

Have you thought this through?

I have seen organizations where passwd says
that home is something like
"/usr/users/fred", where "/usr/users/fred"
might be a local directory (or a link to
one), or else it might be a link to some
global (often NFS-remote) directory. So,
normally fred sees his global home directory,
but a local one can be arranged on a
particular system without disturbing the
passwd data. A scheme like that does require
creating appropriate "/usr/users/xxx" links
for every user on every client system, so
it's handy to have a script to do it, and a
way to run it on all the systems.
admin1979
Super Advisor

Re: NIS Client Setup


Thanks Stevan,

What is "his global home directory"? Will he
ever use it, if every client puts him into
some local home directory?

Global home directory is NFS shared home directory.

This setup is only required for 1 specific host where in we only need the authentication mechanism from NIS but no home directory concept. So that NIS without NFS.

A scheme like that does require
creating appropriate "/usr/users/xxx" links
for every user on every client system, so
it's handy to have a script to do it, and a
way to run it on all the systems.

Yes you are right. Thats what I intended but I thought there could have been a provision in NIS itself. If not then a script would have to be written ..something like whenever user logs in through NIS , look if his home directory exist if not create it.
Right?

Thanx
Steven Schweda
Honored Contributor

Re: NIS Client Setup

> [...] Right?

But where will that script be, and who will
run it (and why)?

NIS is not really magical. If you were not
using NIS, and a user tried to log in without
having a home directory, what would happen?
Who (or which script) would create it? Who
has the permission/rights to create it?

I believe that the easy thing to do is to
use some kind of scheme like that
"/usr/users/xxx" scheme, and manually (as
user root) create any local home directories
for those who need them, where they need
them, before they need them. Write a script,
if there are more than a few things to do.

I don't claim that it's impossible to get the
job done automatically, but I don't see any
simple, easy way.