User Tools

Site Tools


vps_-_netbsd_with_ldap

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
vps_-_netbsd_with_ldap [2021/04/02 09:49] – [Testing] hc9vps_-_netbsd_with_ldap [2021/04/02 19:27] (current) – [Graphical Client] hc9
Line 60: Line 60:
   {SSHA}1LuiLGmSO+EoPA0uk80v4TC5xwacBOWg   {SSHA}1LuiLGmSO+EoPA0uk80v4TC5xwacBOWg
  
-**Note: The "-sflag passed here tells "slappasswdthat we want to pass the secret on the command line. If you execute "slappasswdwithout any arguments, it will prompt for the password on the terminal allowing you to avoid having the password show up in any logs or in the running process list.**+**Note: The ''-s'' flag passed here tells ''slappasswd'' that we want to pass the secret on the command line. If you execute ''slappasswd'' without any arguments, it will prompt for the password on the terminal allowing you to avoid having the password show up in any logs or in the running process list.**
  
-You should copy the whole line to your clipboard as we will need it shortly. Then open up "/var/chroot/openldap/etc/openldap/slapd.confin your favourite editor.+You should copy the whole line to your clipboard as we will need it shortly. Then open up ''/var/chroot/openldap/etc/openldap/slapd.conf'' in your favorite editor.
  
 The first three lines that need changing are near the top of the file. They start with include, pidfile and argsfile and have a path to a file following them. These paths point to the read-only filesystem of the SDF VPS pkgsrc and not our chroot, so they should be changed like so: The first three lines that need changing are near the top of the file. They start with include, pidfile and argsfile and have a path to a file following them. These paths point to the read-only filesystem of the SDF VPS pkgsrc and not our chroot, so they should be changed like so:
Line 71: Line 71:
   argsfile        /var/openldap/run/slapd.args   argsfile        /var/openldap/run/slapd.args
  
-Next, we’ll need to set the suffix, the root DN, and the password for the root DN. The suffix is normally formed from your domain name. In this example, the domain name is shiftout.org, and so the suffix should be "dc=shiftout,dc=org". The suffix should then be copied onto the end of the root DN, so in this example, it becomes: "cn=manager,dc=shiftout,dc=org". For the root DN’s password, replace "secretwith the string you copied to your clipboard earlier.+Next, we’ll need to set the suffix, the root DN, and the password for the root DN. The suffix is normally formed from your domain name. In this example, the domain name is shiftout.org, and so the suffix should be ''dc=shiftout,dc=org''. The suffix should then be copied onto the end of the root DN, so in this example, it becomes: ''cn=manager,dc=shiftout,dc=org''. For the root DN’s password, replace ''secret'' with the string you copied to your clipboard earlier.
  
   suffix          "dc=shiftout,dc=org"   suffix          "dc=shiftout,dc=org"
Line 84: Line 84:
 The final step before running the server for the first time is to configure the rc scripts. These allow for the server to be started on boot. The final step before running the server for the first time is to configure the rc scripts. These allow for the server to be started on boot.
  
-First, copy the example rc script for slapd into the "/etc/rc.ddirectory.+First, copy the example rc script for slapd into the ''/etc/rc.d'' directory.
  
   # cp /usr/pkg/share/examples/rc.d/slapd /etc/rc.d/   # cp /usr/pkg/share/examples/rc.d/slapd /etc/rc.d/
  
-Then edit the new file "/etc/rc.d/slapdwith your favourite editor.+Then edit the new file ''/etc/rc.d/slapd'' with your favorite editor.
  
-There are two lines you need to edit here. The line defining where to find "slapdis fine as the read-only filesystem is fine for executing programs from, it’s only the configuration and data store we needed to move.+There are two lines you need to edit here. The line defining where to find ''slapd'' is fine as the read-only filesystem is fine for executing programs from, it’s only the configuration and data store we needed to move.
  
 The first line that needs to be edited is the location of the configuration file, which should look like this: The first line that needs to be edited is the location of the configuration file, which should look like this:
  
-  "required_files="/var/chroot/openldap/etc/openldap/${name}.conf""+  required_files="/var/chroot/openldap/etc/openldap/${name}.conf"
  
 The second line is the command line arguments that are passed to "slapd" when it is started. This should look like: The second line is the command line arguments that are passed to "slapd" when it is started. This should look like:
  
-  "command_args="-u slapd -g slapd -r /var/chroot/openldap/ -f /etc/openldap/slapd.conf""+  command_args="-u slapd -g slapd -r /var/chroot/openldap/ -f /etc/openldap/slapd.conf"
  
-The "-uand "-gflags are used to specify the user and group that "slapdshould be running as. The "-rflag tells slapd where to chroot, and the "-fflag tells slapd where to find the configuration file. All configuration files are read after the chroot has happened, which is why the path does not include "/var/chroot/openldapin it.+The ''-u'' and ''-g'' flags are used to specify the user and group that ''slapd'' should be running as. The ''-r'' flag tells slapd where to chroot, and the ''-f'' flag tells slapd where to find the configuration file. All configuration files are read after the chroot has happened, which is why the path does not include ''/var/chroot/openldap'' in it.
  
-Finally, it is necessary to enable "slapdin the "rc.conffile.+Finally, it is necessary to enable ''slapd'' in the ''rc.conf'' file.
  
-  "# echo "slapd=YES" >> /etc/rc.conf"+  # echo "slapd=YES" >> /etc/rc.conf
  
-You can edit the file manually and add this line if you would like to keep your "rc.conf" organised in some way.+You can edit the file manually and add this line if you would like to keep your ''rc.conf'' organized in some way.
  
 ===== Testing ===== ===== Testing =====
Line 127: Line 127:
   502c06bd daemon: select: listen=7 active_threads=0 tvp=NULL   502c06bd daemon: select: listen=7 active_threads=0 tvp=NULL
  
-Then you have succeeded in configuring an OpenLDAP to a point where it will start successfully. Press Ctrl+C to stop the server. You can start or stop the server as a daemon using "/etc/rc.d/slapd {start,stop}just like you would with other daemons on NetBSD.+Then you have succeeded in configuring an OpenLDAP to a point where it will start successfully. Press Ctrl+C to stop the server. You can start or stop the server as a daemon using ''/etc/rc.d/slapd {start,stop}'' just like you would with other daemons on NetBSD.
  
-**Note: From this point, configuration will become specific to providing authentication and authorisation services for nix clients. If you’re looking to use LDAP for another application, hopefully you’ve got to a point where a more generalised tutorial is able to help you.**+**Note: From this point, configuration will become specific to providing authentication and authorization services for nix clients. If you’re looking to use LDAP for another application, hopefully you’ve got to a point where a more generalized tutorial is able to help you.**
  
 ===== Including extra schemata ===== ===== Including extra schemata =====
Line 236: Line 236:
 These three values will need to be changed. Hopefully you can also use common sense to identify names and contact information that will need to be changed. These three values will need to be changed. Hopefully you can also use common sense to identify names and contact information that will need to be changed.
  
-Assuming you have saved your LDIF file as "/tmp/ldif", run the following command to import it:+Assuming you have saved your LDIF file as ''/tmp/ldif'', run the following command to import it:
  
   ldapadd -D "cn=manager,dc=shiftout,dc=org" -Wx -f /tmp/ldif   ldapadd -D "cn=manager,dc=shiftout,dc=org" -Wx -f /tmp/ldif
Line 258: Line 258:
 Apache Directory Studio provides a graphical browser that you can use to add, query, modify and remove data from your LDAP database. It can be downloaded from http://directory.apache.org/studio/. Apache Directory Studio provides a graphical browser that you can use to add, query, modify and remove data from your LDAP database. It can be downloaded from http://directory.apache.org/studio/.
  
-$Id: VPS_NetBSD_OpenLDAP.html,v 1.5 2012/08/16 00:47:07 irl Exp $+---- 
 +$Id: VPS_NetBSD_OpenLDAP.html,v 1.5 2012/08/16 00:47:07 irl Exp $ [[http://sdf.org/?tutorials/VPS_NetBSD_OpenLDAP|Installing an OpenLDAP Server on a NetBSD VPS]] - traditional link (using [[wp>Revision_Control_System|RCS]])
vps_-_netbsd_with_ldap.1617356995.txt.gz · Last modified: 2021/04/02 09:49 by hc9