NIS Authentication/Adding user question

Chris F.A. Johnson cfaj-uVmiyxGBW52XDw4h08c5KA at public.gmane.org
Mon May 15 02:21:29 UTC 2006


On Sun, 14 May 2006, Michael Yang wrote:
>On Sun, 14 May 2006, Chris F.A. Johnson wrote:
>> I am new to a lab and now trying to add an new user onto the lab
>> network which has Linux workstations and a Freebsd server. All
>> user's home directories are shared on the Freebsd server and the
>> server hold all user account information using NIS/NFS.
>>
>> I have added a new user to the server, and run 'make' under /var/yp
>> afterwards, I still not able to logon from the workstatins with the
>> new account i created on the server, and I do not see the new
>> account info shows in /var/yp/master.passwd file.
>>
>> My questions are:
>>
>> 1. Am I missing anything steps in the process of adding users
>>
>> 2. How long will it take to propogate the new account settings
>
> How are you adding the user? If you are using adduser, that will
> just create an entry in the local password file.
>
> To create a new NIS user, the information goes into
> /var/yp/master.passwd, and running make builds the database using
> the information in that file.
>
>  I used addusr and thought NIS would add new entries to its
> database, I guess it is not the case. Could you point out how I
> should create a new user that it shows in /var/yp/master.passwd?

     Do it any way you like: text editor, shell script, C program, etc.

     The format in master.passwd is similar to /etc/passwd, with two
     extra fields added. For example, I use this to move users from a
     file in /etc/passwd format to the master.passwd file:

awk -F: 'BEGIN {OFS = ":" }
              {print $1, $2, $3, $4, "", "0", "0", $5, $6, $7}
             ' $REG/shadow > $REG/master.passwd


     The file is then moved to /var/yp, and make is run in that
     dierectory.

-- 
    Chris F.A. Johnson                      <http://cfaj.freeshell.org>
    ===================================================================
    Author:
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list