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
YPPUSH(8)						    BSD System Manager's Manual 						 YPPUSH(8)

NAME
yppush -- force propagation of updated NIS databases SYNOPSIS
yppush [-d domain] [-t timeout] [-j #parallel jobs] [-h host] [-p path] [-v] mapname DESCRIPTION
The yppush utility distributes updated NIS databases (or maps) from an NIS master server to NIS slave servers within an NIS domain. It is normally only run on the NIS master by /var/yp/Makefile whenever any of the NIS maps are updated. Note that /var/yp/Makefile does not invoke yppush by default: the ``NOPUSH=True'' entry in the Makefile must first be commented out (the default FreeBSD configuration assumes a small network with only a single NIS server; in such a configuration, yppush is not needed). By default, yppush determines the names of the slave servers for a domain by searching the ypservers map. A destination host (or a list of hosts) can also be manually specified on the command line. Once it has a complete list of slave servers, it sends a 'map transfer' request to each slave, which in turn reads a copy of the map from the master NIS server using ypxfr(8). Included within each request is the name of the map to be copied and some special information required by ypxfr(8) to successfully 'callback' to yppush and carry out the transfer. Any error messages yppush receives from ypxfr(8) via callback will be printed to stderr. The following options are available: -d domain Specify a particular domain. The NIS domain of the local host system is used by default. If the local host's domain name is not set, the domain name must be specified with this flag. -t timeout Specify a timeout value in seconds. This timeout controls how long yppush will wait for a response from a slave server before send- ing a map transfer request to the next slave server in its list. -j #parallel jobs The yppush utility normally performs transfers serially, meaning that it will send a map transfer request to one slave server and then wait for it to respond before moving on to the next slave server. In environments with many slaves, it is more efficient to initiate several map transfers at once so that the transfers can take place in parallel. The -j flag is used to specify the desired number of parallel jobs: yppush will initiate the specified number of transfers immediately and listen for responses. If the number of specified parallel jobs is less than the number of slave servers, yppush will initiate only the number of specified jobs and then wait for some of them to finish before starting any more. Note that yppush handles callbacks asynchronously, which means that it will collect and display the callback information received from ypxfr(8) as soon as it arrives, even it arrives before all of the map transfer requests have been sent. -h host Can be used to transfer a map to a user-specified machine or group of machines instead of the list of servers contained in the ypservers map. A list of hosts can be specified by using multiple instances of the -h flag. -p path By default, yppush expects all the local NIS maps to be stored under /var/yp. The -p flag can be used to specify an alternate path in the event that the system administrator decides to store the NIS maps somewhere else. -v Verbose mode: it causes yppush to print debugging messages as it runs. Specifying this flag twice makes yppush even more verbose. FILES
/var/yp/[domainname]/ypservers the NIS ypservers map containing the names of all servers in a particular NIS domain SEE ALSO
yp(8), ypserv(8), ypxfr(8) AUTHORS
Bill Paul <wpaul@ctr.columbia.edu> BUGS
The mechanism for transferring NIS maps in NIS v1 is different than that in NIS version 2. This version of yppush has support for transfer- ring maps to NIS v2 systems only. BSD
February 5, 1995 BSD