<br><br><div class="gmail_quote">On Tue, Nov 15, 2011 at 10:22 AM, Rob Crittenden <span dir="ltr"><<a href="mailto:rcritten@redhat.com">rcritten@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Boris Epstein wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
<br>
On Tue, Nov 15, 2011 at 10:08 AM, Rich Megginson <<a href="mailto:rmeggins@redhat.com" target="_blank">rmeggins@redhat.com</a><br></div>
<mailto:<a href="mailto:rmeggins@redhat.com" target="_blank">rmeggins@redhat.com</a>>> wrote:<br>
<br>
__<div class="im"><br>
On 11/15/2011 07:44 AM, Boris Epstein wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
<br>
<br>
On Mon, Nov 14, 2011 at 7:16 PM, Nalin Dahyabhai <<a href="mailto:nalin@redhat.com" target="_blank">nalin@redhat.com</a><br></div><div><div class="h5">
<mailto:<a href="mailto:nalin@redhat.com" target="_blank">nalin@redhat.com</a>>> wrote:<br>
<br>
On Mon, Nov 14, 2011 at 05:19:44PM -0500, Boris Epstein wrote:<br>
> Hello all,<br>
><br>
> I am using the FreeIPA to run NIS via a plugin. Works<br>
great - except<br>
> that the ypserv port numbers end up different after every<br>
reboot. That<br>
> makes it hard to run it with the firewall activated.<br>
><br>
> Does anybody know how to make those port number<br>
assignments permanent?<br>
<br>
There's no tooling specifically for doing this, but the plugin<br>
supports<br>
it. In order to get it to use a fixed port, you'll need to<br>
edit the<br>
directory server entry for "cn=NIS Server, cn=plugins,<br>
cn=config" and<br>
add a "nsslapd-pluginarg0" value which contains the port<br>
number you'd<br>
like it to use.<br>
<br>
You can do this either by stopping the directory server,<br>
editing its<br>
dse.ldif file directly, and then restarting it, or by editing<br>
the entry<br>
"live" using ldapmodify and then restarting the server. The<br>
latter<br>
method (I'm using port 541 here) looks something like this:<br>
<br>
# ldapmodify -x -D "cn=Directory Manager" -W <<- EOF<br>
dn: cn=NIS Server,cn=plugins,cn=config<br>
changetype: modify<br>
replace: nsslapd-pluginarg0<br>
nsslapd-pluginarg0: 541<br>
-<br>
<br>
EOF<br>
# ipactl restart<br>
<br>
You'll need to supply the Directory Manager password. Once<br>
that's done,<br>
running "rpcinfo -p" on the server should show that the NIS<br>
service is<br>
listening on the desired port.<br>
<br>
HTH,<br>
<br>
Nalin<br>
<br>
<br>
Nalin,<br>
<br>
Thanks a lot for the tip. It definitely looks like this put me on<br>
the right path though I am not quite there yet.<br>
<br>
Doing what you suggested did not quite work. For one thing, the<br>
right cn is "NIS", not "NIS Server". Another thing is, it does not<br>
look like the LDIF files in question have the nsslapd-pluginarg0<br>
parameter - or are happy with it being added.<br>
</div></div></blockquote><div><div class="h5">
You have to shutdown the directory server first<br>
service dirsrv stop<br>
or<br>
systemctl stop dirsrv.target<br>
<br>
<br>
Rich,<br>
<br>
I even went as far as rebooting the whole machine - even that did not<br>
seem to make a difference.<br>
<br>
Boris.<br>
</div></div></blockquote>
<br>
Strange, it is NIS Server on my install too. Can you show the output of your entry?<br>
<br>
This worked for me:<br>
<br>
# ldapmodify -x -D 'cn=directory manager' -w secretpassword<div class="im"><br>
dn: cn=NIS Server,cn=plugins,cn=config<br>
changetype: modify<br></div>
add: nsslapd-pluginarg0<br>
nsslapd-pluginarg0: 541<br>
<br>
modifying entry "cn=NIS Server,cn=plugins,cn=config"<span class="HOEnZb"><font color="#888888"><br>
<br>
rob<br>
</font></span></blockquote></div><br><div>Rob,</div><div><br></div><div>Brilliant, thanks! This seems to have done the trick. Here's my output:</div><div><br></div><div><div>[root@noreaster ~]# ldapmodify -x -D 'cn=directory manager' -w <secret password></div>
<div>dn: cn=NIS Server,cn=plugins,cn=config</div><div>changetype: modify</div><div>add: nsslapd-pluginarg0</div><div>nsslapd-pluginarg0: 995</div><div>modifying entry "cn=NIS Server,cn=plugins,cn=config"</div><div>
<br></div><div>[root@noreaster ~]# ipactl restart</div><div>Restarting Directory Service</div><div>Restarting KDC Service</div><div>Restarting KPASSWD Service</div><div>Restarting HTTP Service</div><div>Restarting CA Service</div>
<div>[root@noreaster ~]# </div></div><div><br></div><div>Cheers,</div><div><br></div><div>Boris.</div>