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
ypmake(1M)																ypmake(1M)

NAME
ypmake - create or rebuild Network Information Service databases SYNOPSIS
source_directory] NIS_domain] passwd_file] shadow_file] [map [map ...]] source_directory] NIS_domain] passwd_file] shadow_file] [map ...] Remarks The Network Information Service (NIS) was formerly known as Yellow Pages (yp). Although the name has changed, the functionality of the service remains the same. DESCRIPTION
is a shell script that builds one or more Network Information Service (NIS) maps (databases) on a master NIS server. If no arguments are specified, either creates maps if they do not already exist or rebuilds maps that are not current. These maps are constructed from ASCII files. then executes to notify slave NIS servers of the change and make the slave servers copy the updated maps to their machines (see yppush(1M)). If any maps are supplied on the command line, creates or updates those maps only. Permissible names for maps are the filenames in listed under FILES below. In addition, specific maps can be named, such as or The command can be used instead of (see make(1)). The no longer calls the script but now actually constructs the maps. All NIS commands have been modified to use the instead of The and can co-exist, but it is recommended that you consider using the which is the standard mechanism for building maps on other vendor's machines. Both the and script use five variables: The directory containing the ASCII source files from which maps are constructed. defaults to Causes to construct maps for the specified NIS_domain. defaults to the NIS domain shown by (see domainname(1)). When non-null (null by default), inhibits copying the new or updated databases to the slave NIS servers. Only slave NIS servers in the specified domain receive notification when is null. Does the same thing as and sends a "clear current map" request to the local process. Specifies the full pathname of the ASCII file that should use when building the NIS passwd maps. defaults to Specifies the full pathname of the ASCII file that must use in conjunction with the to build NIS password maps. is ignored if is set to 0 in defaults to The order of arguments passed to is unimportant, but the maps are built or updated in the left-to-right order provided. Refer to ypfiles(4) and ypserv(1M) for an overview of Network Information Service. NOTE: The file contains IPv4 and IPv6 addresses. collects data from the file and builds four maps, namely and The and maps contain IPv4 data and the and maps contain IPv4 and IPv6 data. DIAGNOSTICS
returns one of the following exit codes upon completion: 0 Normal termination; no problems. 1 One or more unrecognized arguments were passed. 2 The NIS domain name is not set. 3 The subdirectory used to contain maps for a specific NIS domain, does not exist or is not writable. 4 An error was encountered when building at least one of the maps. 5 One or more maps' ASCII files do not exist or are unreadable. EXAMPLES
Create or rebuild the password databases (both the and maps) from and use to copy the databases to any slave NIS servers in the default NIS domain: Create or rebuild the hosts databases from but do not copy the databases to any slave NIS servers: Create or rebuild the network maps from and copy the maps to any slave NIS servers in NIS domain AUTHOR
was developed by Sun Microsystems, Inc. FILES
SEE ALSO
domainname(1), make(1), makedbm(1M), ypinit(1M), yppush(1M), ypserv(1M), group(4), hosts(4), netgroup(4), networks(4), passwd(4), proto- cols(4), publickey(4), rpc(4), services(4), ypfiles(4). ypmake(1M)