Environment
eDirectory 9.0.4
RedHat 7.X
Situation
If a user on RedHat uses sudo /bin/bash or su - to become root, ndsconfig fails to start the ndsd process.
EXAMPLE:
Add to the /etc/sudoers %janedoe ALL= (ALL) ALL Login as janedoe Then either sudo /bin/bash or su - [janedoe@rhel74 ~]$ sudo /bin/bash [sudo] password for janedoe:
Enter admin name with context[admin.org]:admin.novell
Enter the password for admin.novell:
Re-enter the password for admin.novell:
Enter tree name[root-rhel74-NDStree]:acme
Enter server context[org]:servers.acme
Do you want to configure Enhanced Background Authentication (EBA)? (y/[n])n
Please enter the absolute path for the instance [ /var/opt/novell/eDirectory ]:
Please enter absolute path of the database directory [ /var/opt/novell/eDirectory/data/dib ]:
Configuring the NDAP interfaces... Done
Configuring the HTTP interfaces... Done
Configuring the LDAP interfaces... Done
Configuring NetIQ eDirectory server with the following parameters, Please wait...
Tree Name : acme
Server DN : rhel74.servers.acme
Admin DN : admin.novell
NCP Interface(s) : 192.168.157.170@524
HTTP Interface(s) : 192.168.157.170@8028
HTTPS Interface(s) : 192.168.157.170@8030
LDAP TCP Port : 389
LDAP TLS Port : 636
LDAP TLS Required : Yes
Duplicate Tree Lookup : Yes
Configuration File : /etc/opt/novell/eDirectory/conf/nds.conf
Instance Location : /var/opt/novell/eDirectory/data
DIB Location : /var/opt/novell/eDirectory/data/dib
Starting the service 'ndsd'... Done.
Checking if server is ready to service requests... Command socket error: No such file or directory. ErrorCode=2
Oct 27 13:03:12 n4u_send_command failed with error code=-1
Server down. Please check /var/opt/novell/eDirectory/log/ndsd.log for details.
ERROR: ndsconfig return value = 12.
Enter the password for admin.novell:
Re-enter the password for admin.novell:
Enter tree name[root-rhel74-NDStree]:acme
Enter server context[org]:servers.acme
Do you want to configure Enhanced Background Authentication (EBA)? (y/[n])n
Please enter the absolute path for the instance [ /var/opt/novell/eDirectory ]:
Please enter absolute path of the database directory [ /var/opt/novell/eDirectory/data/dib ]:
Configuring the NDAP interfaces... Done
Configuring the HTTP interfaces... Done
Configuring the LDAP interfaces... Done
Configuring NetIQ eDirectory server with the following parameters, Please wait...
Tree Name : acme
Server DN : rhel74.servers.acme
Admin DN : admin.novell
NCP Interface(s) : 192.168.157.170@524
HTTP Interface(s) : 192.168.157.170@8028
HTTPS Interface(s) : 192.168.157.170@8030
LDAP TCP Port : 389
LDAP TLS Port : 636
LDAP TLS Required : Yes
Duplicate Tree Lookup : Yes
Configuration File : /etc/opt/novell/eDirectory/conf/nds.conf
Instance Location : /var/opt/novell/eDirectory/data
DIB Location : /var/opt/novell/eDirectory/data/dib
Starting the service 'ndsd'... Done.
Checking if server is ready to service requests... Command socket error: No such file or directory. ErrorCode=2
Oct 27 13:03:12 n4u_send_command failed with error code=-1
Server down. Please check /var/opt/novell/eDirectory/log/ndsd.log for details.
ERROR: ndsconfig return value = 12.
Resolution
This issue has been reported to development.
Workaround 1: login directly as root
Workaround 2: After the user has become root through sudo or su but prior to running ndsconfig; echo 0 > /proc/self/loginuid
See the "Additional Information" section for an optional resolution as a sudo root or su - root user.
See the "Additional Information" section for an optional resolution as a sudo root or su - root user.
Cause
Login on the Red Hat server is creating a /proc/self/loginuid with the uid of the login user.
If the value of the loginuid is not 0, ndsconfig doesn't succeed in starting the ndsd service.
Bug Number
1065510
Additional Information
The nds-install script stops the NDS service at the beginning of the upgrade process. At the end of the upgrade process it calls 'ndsconfig upgrade' which attempts to start the service and fails as per the referenced "cause." At this point the NDS binaries are updated.
To complete the process or ndsconfig upgrade as a sudo root or su - root user, perform the following procedure:
1. Start NDS via the ndsmanage utility
2. Execute 'ndsconfig upgrade'.
To complete the process or ndsconfig upgrade as a sudo root or su - root user, perform the following procedure:
1. Start NDS via the ndsmanage utility
2. Execute 'ndsconfig upgrade'.