Return to BSD News archive
Xref: sserve comp.sys.sun.admin:11521 comp.sys.sun.misc:6853 comp.unix.solaris:2122 comp.unix.bsd:11763 Newsgroups: comp.sys.sun.admin,comp.sys.sun.misc,comp.unix.solaris,comp.unix.bsd Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!haven.umd.edu!darwin.sura.net!welchgate.welch.jhu.edu!seth From: seth@welchgate.welch.jhu.edu (Seth Perlman) Subject: NIS maint. via ndbm C-calls Message-ID: <1993Apr6.211624.26997@welchgate.welch.jhu.edu> Organization: Johns Hopkins Univ. Welch Medical Library Date: Tue, 6 Apr 1993 21:16:24 GMT Lines: 44 My TASK: I am making an NIS database (/etc/passwd) which is based upon the contents of a patron-registration system(SYBASE DBMS). This NIS database will control approx 14000 /etc/passwd entries. I need to maintain this database using the ndbm routines rather than shell scripts for a variety of reasons such as the following: I can't just 'makedbm' an ascii /etc/passwd file because it takes too long for makedbm to process a >=10000-line ascii /etc/passwd file into passwd maps. Moreover, I need to maintain the database in real-time and makedbm takes around 8 mins on a Sparc 1 running SunOS 4.1.3 to 'makedbm' a 15000-line /etc/passwd file. Thus, I must use the ndbm C routines in order to maintain the passwd.byname and passwd.byuid NIS maps for this system. My REQUEST: Has anyone done anything similar to this who would care to share any caveats and/or code which may help speed up this task? For example, do I need to do anything with the following two entries which 'makedbm' automatically places into the passwd maps: YP_LAST_MODIFIED 0734041589 (system time of last 'make' of ascii passwd file) YP_MASTER_NAME my.machine.jhh.edu Is there a more than negligible risk that the maps will be corrupted if they are in the process of being changed by ndbm routines while, at the same time, a client is accessing the maps to let a user login to it? Are there any mechanisms to prevent such conflicts or is this not a practical issue? Will I be able to run the same code if I upgrade to **Solaris 2.1**? If not, what will the porting require? Is it desirable to have a space between the key field and the rest of the record when inserting lines into the NIS maps? Thank you in advance for any help on any of the above questions. Please feel free to call me or have me call you if this is more convenient. Seth Perlman Johns Hopkins Univ., Welch Applied Research Lab 2024 East Monument Street (410)955-7198 Balt MD 21205 seth@library.welch.jhu.edu (Internet)