Smart Card Setup Guide
Smart Card Setup Guide
Smart Card Setup Guide
Setup Guide
Contents
Chapter 1
4
4
5
5
5
Chapter 2
6
6
8
8
8
9
10
10
11
12
Chapter 3
14
14
14
15
15
15
5 To back up the original authorization file and create a separate file to modify, enter:
cp authorization authorization.orig
cp authorization /tmp/authorization.mod
6 Open the authorization.mod file you just created in a text editor or property list editor.
The file is located in the tmp folder on your startup drive:
/tmp/authorization.mod
7 The authorization.mod file is made up of a list of properties arranged in a hierarchy of
dictionaries. At the root level of the property list is the rights dictionary, which
contains a long list of other dictionaries.
Find the system.login.console dictionary in the rights dictionary. It contains an
array called mechanisms that must be modified.
8 Make the following changes to the mechanisms array within the system.login.console
dictionary:
a Add <string>builtin:smartcard-sniffer,privileged</string> after the item
<string>builtin:auto-login,privileged</string>.
b Delete <string>authinternal</string>.
c Add <string>builtin:authenticate,privileged</string> after the item
<string>builtin:reset-password,privileged</string>.
9 At the root level of the property list is the rules dictionary.
Find the authenticate dictionary. It contains an array called mechanisms that must be
modified.
10 Make the following changes to the mechanisms array within the authenticate
dictionary.
a Add <string>builtin:smartcard-sniffer,privileged</string> to the beginning
of the mechanisms array.
b Delete <string>authinternal</string>.
c Add <string>builtin:authenticate,privileged</string> after the item
<string>builtin:authenticate</string>.
11 Save your changes.
12 Your original session should still be running in Terminal. To replace the actual
authorization file with the edited version, enter:
cp /tmp/authorization.mod /etc/authorization
The changes take place immediately; you dont need to restart the system.
After smart card login is enabled, the system starts checking whether a card reader is
attached to the computer. Unlike with previous versions of smart card software, you do
not need to enter additional commands for your computer to recognize the reader.
Not all cards have three private keys. In this example, any of the hash entries listed
could be used for binding the card to the account. The following example uses the
identity private key to bind the smart card to the user account.
10
5 You bind the card to the users local directory domain by using the sc_auth accept
command. Using the identity private key from the previous example, the command
looks like this:
sudo sc_auth accept -u myuser -h 01C2E294XP77B57B63B0A15B8F204C1
In Terminal, enter the following command, using the accounts short user name for
<username> and the smart cards identity private key for <# Identity Private Key>:
sudo sc_auth accept -u <username> -h <# Identity Private Key>
The sc_auth command adds a field to the user's authentication called the
authentication_authority property. You can see the authentication_authority
property by using the nidump command. The following example shows the new
identity private key written into the user public key hash.
nidump -r /users/myuser
...
"authentication_authority" = ( ";ShadowHash;", ";pubkeyhash
01C2E294XP77B57B63B0A15B8F204C1" );
...
In the previous example with three hash keys, any of the key entries could have been
used for binding the card to the account. More than one smart card can be bound to a
single user account by running the script again with the hash for each additional card.
Note: Multiple cards can be bound to a single account, but a single card cannot be
bound to multiple accounts accessible from a single system.
11
The directorySearchKey is the users lookup key. It specifies the directory key to search
for.
This example returns a combined search string:
[email protected]#0123456789@mil/US
12
Here is an example of CAC keys that can appear as fields in the configuration file:
Key String
Example
Country
U.S.
Organization
U.S. Government
Organizational Unit:1
DoD
Organizational Unit:2
PKI
Organizational Unit:3
USN
Common Name
SURNAME.GIVEN.MI.1160048910
NT Principal Name
0123456789@mil
13
14
15
16