How to enable non-root instances of eDirectory to start at server boot

  • 3048495
  • 16-Jan-2008
  • 22-Jun-2015

Environment

Novell eDirectory 8.8 SP8 for Linux

Situation

Purpose:
How to enable non-root instances of eDirectory to start automatically on boot and run as a non root user.

Issue:
eDirectory instances from a non-root install do not start automatically.




Resolution

Background
 
Ndsmanage with the "startall" parameter can be used to start all instances of eDirectory configured on a system.

Knowing this the easiest solution is to have a script in /etc/init.d/ containing this as an example :

su - user -c"/home/user1/eDirectory/opt/novell/eDirectory/bin/ndsmanage startall"

Links can then be created from the corresponding run levels to /etc/init.d/.  This will allow instances to start at run levels 2, 3 and 5.
/etc/init.d/rc2.d/S11ndsstart
/etc/init.d/rc3.d/S11ndsstart
/etc/init.d/rc5.d/S11ndsstart


Step by step example:

1. Edit start script
- "vi /etc/init.d/ndsstart"
- Type "i" to go to insert mode and type the following:
- su - user1 -c"/home/user1/eDirectory/opt/novell/eDirectory/bin/ndsmanage startall"
- Press escape then type :wq to save the file.

2. Add the execute permission:
- chmod 744 /etc/init.d/ndsstart

A listing of ls -la of this file should look like the following:
-rwxr--r-- 1 root root 90 Jan 16 15:42 /etc/init.d/ndsstart

3. The following soft links need to be created:
- "ln -s /etc/init.d/ndsstart /sbin/rcndsstart"
- "ln -s /etc/init.d/ndstart /etc/init.d/rc2.d/S10ndsstart"
- "ln -s /etc/init.d/ndstart /etc/init.d/rc3.d/S10ndsstart"
- "ln -s /etc/init.d/ndsstart /etc/init.d/rc5.d/S10ndsstart"

Afterward, if the server is rebooted all instances of eDirectory configured will start up automatically at run levels 2, 3 and 5.  In this example it will run as user1.

Example:
user1@sb-sles10sp1-vm:/root> ps -eaf|grep ndsd
user13048 1 0 16:06 ? 00:00:01 //home/user1/eDirectory//opt/novell/eDirectory/sbin/ndsd

user1@sb-sles10sp1-vm:/root> ndsmanage
Server instances management utility for

The following are the instances configured by user1
[1] /home/user1/edir/conf/sb1-tree.conf : .SB1.LINUX.NOVELL.SB1-TREE. : 192.168.100.15@1524 : ACTIVE













Additional Information

For a service to be included in a runlevel, it must be symbolically linked into the desired runlevel (found in /etc/rc.d/rc0.d/ through /etc/rc.d/rc6.d/). These links specify which services to to start and stop as each runlevel is entered. The links are named in such a way that they control the order the scripts are started and stopped. First, the name starts with an S or K. An S indicates the script is to receive the 'start' parameter, and 'K' indicates it should receive the 'stop' parameter. Next, there is a two-digit number. This specifies the order a service should be started/stopped in. Lastly, the name of the service is listed.

Feedback service temporarily unavailable. For content questions or problems, please contact Support.