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.
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)
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)
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)
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)
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)
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)
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)
ypfiles(4) Kernel Interfaces Manual ypfiles(4)NAME
ypfiles - Network Information Service (NIS) database and directory structure
DESCRIPTION
The NIS database lookup service uses a database of dbm/ndbm, btree, or hash files in the /var/yp directory hierarchy. A dbm/ndbm database
consists of two files created by calls to the dbminit(3) function. One has the filename extension .pag and the other has the filename
extension .dir. For instance, the database named hosts.byname, is implemented by the pair of files hosts.byname.pag and hosts.byname.dir.
A btree or hash database consists of a single file created by calls to the dbopen(3) function. A btree file has the filename extension
.btree; a hash file has the extension .hash.
A dbm/ndbm database served by NIS is called an NIS map. A NIS domain is a named set of NIS maps. Each NIS domain is implemented as a sub-
directory of /var/yp containing the maps. The number of NIS domains that can exist is unlimited. Each domain can contain any number of
maps.
The NIS maps are not required by the NIS lookup service, although they may be required for the normal operation of other parts of the sys-
tem. The NIS lookup service serves all maps. If the map exists in a given domain and a client asks about it, NIS will serve it. There is,
however, a set of default maps that the NIS service serves. The files representing these maps are listed in this description under Files.
For a map to be accessible consistently, it must exist on all NIS servers that serve the domain. To provide data consistency between the
replicated maps, an entry to execute the ypxfr command periodically should be made in the /var/spool/cron/crontab/root file on each slave
server. More information on this topic is in ypxfr(8). An entry in the /var/spool/cron/crontab/root file must not exist, either on a NIS
master server or on a pure NIS client machine.
The NIS maps should contain two distinguished key-value pairs. The first is the key YP_LAST_MODIFIED, whose value is a 10-character ASCII
order number. The order number should be the UNIX time in seconds when the map was built. The second key is YP_MASTER_NAME, with the name
of the NIS master server as a value. The makedbm(8) command generates both key-value pairs automatically. A map that does not contain
both key-value pairs can be served by the NIS, but the ypserv process will not be able to return values for ``Get order number'' or ``Get
master name'' requests. In addition, the values of these two keys are used by ypxfr(8) when it transfers a map from a master NIS server to
a slave.
Before they can be properly accessed, the NIS maps must be initially set up for both masters and slaves by using the ypsetup(8) function.
Further, NIS maps must be generated and modified only at the master server location. Copies of the master server NIS maps can then be
transferred to the slave servers using the ypxfr(8) function. If ypxfr is unable to determine a map's location, or if it is unable to
determine whether the local copy is more recent than the master copy, extra command line switches must be set when it is executed.
After the server databases are set up, the contents of some maps may change. In general, some ASCII source version of the database exists
on the master. This version should be changed with a standard text editor. The update is incorporated into the NIS map and is propagated
from the master to the slaves by running /var/yp/Makefile. All maps must have entries in /var/yp/Makefile. If an NIS map is added, the
/var/yp/Makefile must be edited to support the new map. The makefile uses makedbm(8) to generate the NIS map on the master, and yppush(8)
to propagate the changed map to the slaves. The yppush(8) command is a client of the map ypservers, which lists all of the NIS servers.
FILES
/var/yp/src/passwd
/var/yp/src/group
/var/yp/src/hosts
/var/yp/src/networks
/var/yp/src/services
/var/yp/src/protocols
/var/yp/src/netgroup
RELATED INFORMATION
Commands: makedbm(8), rpcinfo(8), ypmake(8), yppoll(8), yppush(8), ypserv(8), ypsetup(8), ypxfr(8).
Functions: btree(3), dbm(3), hash(3), ndbm(3). delim off
ypfiles(4)