Following directions doesn't seem to work: Adding users in NIS

Manolis Kiagias sonicy at otenet.gr
Mon Oct 15 12:29:44 PDT 2007



David Benfell wrote:
> On Mon, 15 Oct 2007 18:57:27 +0300, Manolis Kiagias wrote:
>   
>>>   
>>>       
>> The following comes from the handbook and works for me:
>>
>> copy your master.passwd to /var/yp, i.e:
>>
>> cp /etc/master.passwd /var/yp/master.passwd
>>
>> Edit the copy of master.passwd and exclude all "irrelevant" accounts
>> (root,servers and so on)
>>
>> Then run:
>>
>> ypinit -m your-nis.domain
>>
>>     
> So the message I'm getting here is that the procedure used to initially
> set up NIS is the same as that used to update NIS.  Further down that page,
> it claims that pw can be used to add users to an existing scheme
Reinitializing the maps like this should cause no problem, and you will
get all the new accounts.
I have not tried the update procedure from the handbook, I got stuck
with the linux client.

> :
>
> <quote>
> 27.4.8 Important Things to Remember
>
> There are still a couple of things that you will need to do differently now that you are in an NIS environment.
>
>     *
>
>       Every time you wish to add a user to the lab, you must add it to the master NIS server only, and you must remember to rebuild the NIS maps. If you forget to do this, the new user will not be able to login anywhere except on the NIS master. For example, if we needed to add a new user jsmith to the lab, we would:
>
>       # pw useradd jsmith
>       # cd /var/yp
>       # make test-domain
>
>       You could also run adduser jsmith instead of pw useradd jsmith.
> </quote>
>
>   
This looks more or less similar to Linux procedures ( usually make -C
/var/yp), but as I said I have not tried this on FreeBSD.
>> My real problem with nis is the fact the freebsd maps are not compatible
>> with linux clients, and I can't seem to get the Makefile right...
>>     
>
> Ouch!  I'm ultimately planning to add a Linux client.  In theory, I can get
> by with just NFS for this particular application, but it would be better to
> have NIS as well.
>
>
>
>   
Well I can tell you with certainty, it is not compatible out of the box,
and I have not managed to make it work (though I must admit I did not
put a lot of effort into this). Seems the exported master.passwd map
needs a filename change + internal changes, thus the NIS Makefile needs
to be modified. On the Linux side, the users are visible (e.g. you can
run id <username> and the user is there) but they cannot login.
If you Google "FreeBSD NIS Server Linux Clients" you will get some
patches for the NIS Makefile to make it Linux compatible. I was not
however successful with this. If you do try it and get it to work,
please report back.


Manolis


More information about the freebsd-questions mailing list