MacLdapAuthSnowLeopard: Difference between revisions
No edit summary |
m (Reverted edits by Yxawyjo (Talk) to last version by AlainKnaff) |
||
Line 1: | Line 1: | ||
=Setting up LDAP access to LLL server on a Macintosh client= | =Setting up LDAP access to LLL server on a Macintosh client= | ||
Line 14: | Line 6: | ||
==Disable or set up SSL certificate verification== | ==Disable or set up SSL certificate verification== | ||
* Open a terminal by clicking on the | * Open a terminal by clicking on the "Applications" icon in the dock (see red arrow in image below) | ||
* Click Utilities folder | * Click Utilities folder | ||
* Click Terminal | * Click Terminal | ||
Line 20: | Line 12: | ||
[[Image:Applications6.png|Applications]] | [[Image:Applications6.png|Applications]] | ||
* Do | * Do <code>sudo vi /etc/openldap/ldap.conf</code> file and add <code>TLS_REQCERT never</code> to the end (removing or commenting out any other <code>TLS_REQCERT</code> setting that might be there) if you want to disable SSL certificate verification | ||
* Add | * Add <code>TLS_CACERT /path/to/cacert.pem</code> to set it up instead (where cacert.pem is the certificate for the CA, which first must be copied here) | ||
==Open Directory access== | ==Open Directory access== | ||
Click on apple menu, and chose | Click on apple menu, and chose "System Preferences": | ||
[[Image:MacLdapDirectoryAccess6.png|Accessing the System Preferences]] | [[Image:MacLdapDirectoryAccess6.png|Accessing the System Preferences]] | ||
Line 35: | Line 27: | ||
Click | Click "Login Options" (lower left), and add a "Network Account Server": | ||
[[Image:MacLdapDirectoryAccess6-3.png|Accounts configuration]] | [[Image:MacLdapDirectoryAccess6-3.png|Accounts configuration]] | ||
Line 46: | Line 38: | ||
# Doubleclick on the padlock (lower left of directory acess window) and enter admin user and password until padlock is open | # Doubleclick on the padlock (lower left of directory acess window) and enter admin user and password until padlock is open | ||
# Select | # Select "LDAPv3" in list | ||
# Click the pen icon to | # Click the pen icon to "Configure" | ||
[[Image:MacLdapDirectoryAccess6-5.png|Chose LDAPv3]] | [[Image:MacLdapDirectoryAccess6-5.png|Chose LDAPv3]] | ||
Click | Click "New" to add a new configuration for connecting to your LDAP server: | ||
[[Image:MacLdapDirectoryAccess6-6.png|Add a new connection configuration]] | [[Image:MacLdapDirectoryAccess6-6.png|Add a new connection configuration]] | ||
Pick a configuration name, enter your server's name or IP address, tick | Pick a configuration name, enter your server's name or IP address, tick "Encrypt using SSL", leave the default port (636), and click OK when done: | ||
[[Image:MacLdapDirectoryAccess6-7.png|Configuring your connection to LDAP]] | [[Image:MacLdapDirectoryAccess6-7.png|Configuring your connection to LDAP]] | ||
* Click on the tab | * Click on the tab "Search and Mappings", and the dialog below should be shown | ||
* Pick | * Pick "RFC 2307 (Unix)" template | ||
* Enter | * Enter <code>dc=lll,dc=lu</code> as search base | ||
[[Image:MacLdapDirectoryAccess6-8.png|Configuring your connection to LDAP]] | [[Image:MacLdapDirectoryAccess6-8.png|Configuring your connection to LDAP]] | ||
Line 69: | Line 61: | ||
* Click Mounts in left hand pane | * Click Mounts in left hand pane | ||
* Enter | * Enter <code>ou=Mounts,dc=lll,dc=lu</code> as a search base | ||
* Check check | * Check check "first level only" | ||
N.B. It is expected that the template setting automatically changes from | N.B. It is expected that the template setting automatically changes from <code>RFC 2307</code> to <code>Custom</code> as soon as you change one of the setting. | ||
[[Image:MacLdapDirectoryAccess6-9.png|Mounts configuration]] | [[Image:MacLdapDirectoryAccess6-9.png|Mounts configuration]] | ||
* Click Users in left hand pane | * Click Users in left hand pane | ||
* Enter | * Enter <code>ou=People,dc=lll,dc=lu</code> as a search base | ||
* Check check | * Check check "first level only" | ||
[[Image:MacLdapDirectoryAccess6-10.png|Users configuration]] | [[Image:MacLdapDirectoryAccess6-10.png|Users configuration]] | ||
Line 84: | Line 76: | ||
* Click Groups in left hand pane | * Click Groups in left hand pane | ||
* Enter | * Enter <code>ou=Groups,dc=lll,dc=lu</code> as a search base | ||
* Check check | * Check check "first level only" | ||
* Click ok | * Click ok | ||
[[Image:MacLdapDirectoryAccess6-11.png|Groups configuration]] | [[Image:MacLdapDirectoryAccess6-11.png|Groups configuration]] | ||
* Click | * Click "Search Policy" icon in Top Bar, and add your newly defined server using the + icon | ||
[[Image:MacLdapDirectoryAccess6-12.png|Adding your new connection to the search policy]] | [[Image:MacLdapDirectoryAccess6-12.png|Adding your new connection to the search policy]] | ||
On some newer version of MacOS, you may need to click on the | On some newer version of MacOS, you may need to click on the "Search Policy" Icon at the top of the "Directory Utility" (only clickable if currently no service is being edited: click Ok or Cancel to dismiss if you are editing a service), and then add the newly defined service to the list. | ||
== Testing == | == Testing == | ||
Line 103: | Line 95: | ||
* Open a terminal as described above ( Application button, then Utilities/Terminal) | * Open a terminal as described above ( Application button, then Utilities/Terminal) | ||
* In terminal, enter | * In terminal, enter <code>dscl localhost list /Search/Users | ||
</code>. This displays a list of all users known by the macintosh. If everything worked, it should include all users from the server's LDAP database. | |||
* If the server users are not included, try killing the DirectoryService process (this should cause it to respawn and initialize correctly) and try again | * If the server users are not included, try killing the DirectoryService process (this should cause it to respawn and initialize correctly) and try again | ||
* If all users are included, log out, and log back in as one of the server users (you need to click | * If all users are included, log out, and log back in as one of the server users (you need to click "Other users" at the login window, then enter its name). It's expected that the login process is slow, as we have not yet set up mounting of <code>/home</code>. | ||
* If login was successful, clean away its temporary home directory (if the system created one) | * If login was successful, clean away its temporary home directory (if the system created one) |
Latest revision as of 19:47, 26 November 2010
Setting up LDAP access to LLL server on a Macintosh client[edit]
This page describes how to set up LDAP authentication with SSL on Mac OSX 6 (Snow Leopard).
Disable or set up SSL certificate verification[edit]
- Open a terminal by clicking on the "Applications" icon in the dock (see red arrow in image below)
- Click Utilities folder
- Click Terminal
- Do
sudo vi /etc/openldap/ldap.conf
file and addTLS_REQCERT never
to the end (removing or commenting out any otherTLS_REQCERT
setting that might be there) if you want to disable SSL certificate verification - Add
TLS_CACERT /path/to/cacert.pem
to set it up instead (where cacert.pem is the certificate for the CA, which first must be copied here)
Open Directory access[edit]
Click on apple menu, and chose "System Preferences":
Click Accounts:
Click "Login Options" (lower left), and add a "Network Account Server":
Open Directory Utility:
- Doubleclick on the padlock (lower left of directory acess window) and enter admin user and password until padlock is open
- Select "LDAPv3" in list
- Click the pen icon to "Configure"
Click "New" to add a new configuration for connecting to your LDAP server:
Pick a configuration name, enter your server's name or IP address, tick "Encrypt using SSL", leave the default port (636), and click OK when done:
- Click on the tab "Search and Mappings", and the dialog below should be shown
- Pick "RFC 2307 (Unix)" template
- Enter
dc=lll,dc=lu
as search base
- Click Mounts in left hand pane
- Enter
ou=Mounts,dc=lll,dc=lu
as a search base - Check check "first level only"
N.B. It is expected that the template setting automatically changes from RFC 2307
to Custom
as soon as you change one of the setting.
- Click Users in left hand pane
- Enter
ou=People,dc=lll,dc=lu
as a search base - Check check "first level only"
- Click Groups in left hand pane
- Enter
ou=Groups,dc=lll,dc=lu
as a search base - Check check "first level only"
- Click ok
- Click "Search Policy" icon in Top Bar, and add your newly defined server using the + icon
On some newer version of MacOS, you may need to click on the "Search Policy" Icon at the top of the "Directory Utility" (only clickable if currently no service is being edited: click Ok or Cancel to dismiss if you are editing a service), and then add the newly defined service to the list.
Testing[edit]
Now is time for testing.
- Open a terminal as described above ( Application button, then Utilities/Terminal)
- In terminal, enter
dscl localhost list /Search/Users
. This displays a list of all users known by the macintosh. If everything worked, it should include all users from the server's LDAP database.
- If the server users are not included, try killing the DirectoryService process (this should cause it to respawn and initialize correctly) and try again
- If all users are included, log out, and log back in as one of the server users (you need to click "Other users" at the login window, then enter its name). It's expected that the login process is slow, as we have not yet set up mounting of
/home
. - If login was successful, clean away its temporary home directory (if the system created one)