Prevent accidental push of yp maps from slave servers


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Prevent accidental push of yp maps from slave servers
# 1  
Old 12-18-2016
Prevent accidental push of yp maps from slave servers

To prevent an accidental "cd /var/yp; make all" from being executed on an NIS slave server, I found a helpful hint from an instructor in a Solaris class. Just rename the /var/yp/Makefile to Makefile.orig. You will get an error message when trying to execute the "make all" on a slave server.
This User Gave Thanks to amoser For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Help with accidental endless loop

I was practicing writing simple loops as I am a new bash user and I created this script, which turned out to be an endless loop where the echo output does not stop and I do not see where my mistake is. #!/bin/bash echo 'enter a number from 1 to 100' read number while do ... (2 Replies)
Discussion started by: goldenlinx
2 Replies

2. UNIX for Dummies Questions & Answers

/proc/pid/maps

I think the libc.so is shared between processes, because it is a shared library and OS is engaged for saving memory. But, below, the maps of bash, shows r-xp and r--p rw-p attributes to libc.so which mean private memory space. Can anybody explain this for me? :)cat /proc/$$/maps... (4 Replies)
Discussion started by: vistastar
4 Replies

3. Shell Programming and Scripting

Prevent wrong user from using shell script for multiple remote servers

Hi, I am running a shell script from a central server to multiple remote servers using the following code: application_check() { # Linux/UNIX box with ssh key based login SERVERS=`cat /tmp/server-details` # SSH User name USR="user" # create new file > /tmp/abc.log # connect... (2 Replies)
Discussion started by: mystition
2 Replies

4. UNIX for Dummies Questions & Answers

Accidental deletion of root account

I had created a root account when I installed the Centos 5 into my system. But now the problem I'm facing is that I accidently deleted the root user account in my system. Is there a way to recreate the root account in the system now, without reinstalling the OS? Pls help. (1 Reply)
Discussion started by: anaigini45
1 Replies

5. UNIX for Dummies Questions & Answers

Protect .profile from accidental delete

Hi, Is there a way to protect users from deleteing their .profile ? For the majority of our users I created a captive login by a .profile that starts a menu-script. In this menu a user can only start our applications and logoff. This prevents users from getting to the unix-prompt. ... (7 Replies)
Discussion started by: picard
7 Replies

6. Shell Programming and Scripting

How to remove accidental file

Hi, I have a strange problem. I accidentally created a file named ${1}_$(date+%Y%m%d) and when i am trying to remove it I am getting this error . Can any one suggest me how i can remove this accidental file. (4 Replies)
Discussion started by: dsravan
4 Replies

7. UNIX for Advanced & Expert Users

NIS Maps

Hello.. I stink at NIS! :) Im having a problem with NIS on solaris 2.X. / SPARC I have some maps that are exported to all clients in the domain. Now I setup a new server and add it as a nis client to the domain. On the NIS server there is a auto_direct map that mounts /usr/local . This is... (4 Replies)
Discussion started by: s93366
4 Replies
Login or Register to Ask a Question
YPINIT(8)						    BSD System Manager's Manual 						 YPINIT(8)

NAME
ypinit -- build and install NIS databases SYNOPSIS
ypinit -m [domainname] ypinit -s master_server [domainname] ypinit -u [domainname] DESCRIPTION
The ypinit utility is a script which sets up databases on a Network Information Service (NIS) master or slave server. On a master server, ypinit creates the /var/yp/$DOMAINNAME directory, the /var/yp/ypservers file, and calls /var/yp/Makefile to create and populate an initial set of NIS maps. The maps are created from local source files using the yp_mkdb(8) utility. The utility will prompt the user for a list of servers that support the specified domain; this list is used to populate the ypservers map. On a slave server, ypinit creates the /var/yp/$DOMAINNAME, populates it with copies of the NIS maps from the master. The maps are obtained from the master using the ypxfr(8) utility. The ypinit utility obtains the list of maps to transfer in one of two ways: if the system is configured as an NIS client and is bound to the master server, ypinit is able to use the ypwhich(1) utility to obtain a list of maps exported by the master server. If the system is not configured as a client of the NIS master, ypinit uses a hardcoded list of maps, some of which may or may not actually exist on the master. The system administrator can edit the ypinit script and modify the map list if necessary. Other- wise, individual maps can be transferred manually from the master using ypxfr(8). OPTIONS
The ypinit utility supports the following options: -m [domainname] Set up a master server. By default, ypinit sets up a server for the system default domain. The user can override this default by specifying domainname explicitly. Maps are constructed from scratch using local files as templates using the yp_mkdb(8) utility. -s master_server [domainname] Set up a slave server using master_name as the master. Maps are copied from master_server to the slave using ypxfr(8). By default, ypinit sets up a server for the system default domain. The user can override this default by specifying domainname explicitly. -u [domainname] Update the ypservers map on the master server. When a new slave server is added to a domain, its hostname must be added to the ypservers map so that yppush(8) can propagate updates on the master to all of the slaves. FILES
/etc/bootparams Bootparams source file /etc/ethers Ethers data source file /etc/group Group source file /etc/hosts Hostname/IP address source file /etc/netid RPC netid source file /etc/networks Networks source file /etc/protocols Protocols source file /etc/publickey RPC public key/secret key source file /etc/services Services data source file /etc/shells Shells source file /var/yp/master.passwd Passwd database source file /var/yp/netgroup Netgroup data source file /var/yp/ypservers Ypservers source file (generated by ypinit) SEE ALSO
mknetid(8), revnetgroup(8), yp(8), yp_mkdb(8), yppush(8), ypserv(8), ypxfr(8) HISTORY
This version of ypinit is based on the ypinit script in OpenBSD. It first appeared in FreeBSD 3.0. AUTHORS
The original script was written by Mats O Jansson <moj@stacken.kth.se>. It was modified for FreeBSD by Bill Paul <wpaul@ctr.columbia.edu>. BSD
November 10, 1997 BSD