You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement the SRP (Secure Remote Password) UAM for AFP,
as used by Apple Time Capsule.
The protocol uses SRP-6a with SHA-1,
MGF1 KDF, and RFC 5054 group #2 (1536-bit).
afppasswd is modified to operate on SRP storage file by default,
which stores per-user salts and verifiers.
afppasswd retains the legacy RandNum functionality
activated with the -r flag.
afppasswd -a now takes username as argument rather than previous
positional username arugment
With Kerberos support enabled at compile time, Netatalk also supports:
29
31
@@ -68,16 +70,17 @@ DHX2 is sufficient and provides the strongest encryption.
68
70
69
71
- "Randnum exchange"/"2-Way Randnum exchange" uses only 56-bit DES for encryption,
70
72
so it should also be avoided.
71
-
An additional disadvantage is that passwords must be stored in cleartext on the server,
72
-
and these UAMs do not integrate with PAM or classic */etc/shadow*.
73
-
You must administer passwords separately using the **afppasswd** utility.
73
+
An additional disadvantage is that passwords must be stored as raw hex on the server.
74
74
75
75
However, this is the strongest form of authentication available for
76
76
Macintosh System Software 7.1 or earlier.
77
77
78
78
- "DHCAST128" ("DHX") or "DHX2" is the best choice for most users,
79
79
combining stronger encryption with PAM integration.
80
80
81
+
- "SRP" is the strongest UAM, but it requires a separate file to store per-user salts and verifiers.
82
+
If you don't mind the extra maintenance overhead of this file, SRP is the best choice for security-conscious users.
83
+
81
84
- The Kerberos V ("Client Krb v2")
82
85
UAM enables true single sign-on scenarios using Kerberos tickets.
83
86
The password is not sent over the network.
@@ -92,7 +95,21 @@ For a more detailed overview of the technical implications of the different UAMs
92
95
see Apple's [File Server Security](http://developer.apple.com/library/mac/#documentation/Networking/Conceptual/AFP/AFPSecurity/AFPSecurity.html#//apple_ref/doc/uid/TP40000854-CH232-SW1)
93
96
documentation.
94
97
95
-
## Using different authentication sources with specific UAMs
98
+
## Password storage
99
+
100
+
Randnum and SRP do not use system passwords directly. They both rely on
101
+
separate files managed with **afppasswd**:
102
+
103
+
-**Randnum** uses the legacy *afppasswd* file. By default it stores the raw
104
+
password as hex. If an optional key file exists alongside the Randnum
105
+
password file (same path with a `.key` suffix), the stored password is
106
+
DES-encrypted using that key instead. To use a key file, create
107
+
`<passwd file>.key` containing 16 hex characters (8 bytes) and restrict
108
+
permissions (for example, owner-readable only).
109
+
110
+
-**SRP** uses *afppasswd.srp*, which stores per-user salts and verifiers.
111
+
112
+
## Using different authentication backends
96
113
97
114
Some UAMs support different authentication backends,
98
115
namely **uams_clrtxt.so**, **uams_dhx.so**, and **uams_dhx2.so**.
@@ -114,19 +131,18 @@ The main advantage of PAM is that it integrates Netatalk into centralized authen
114
131
such as LDAP, NIS, and similar systems.
115
132
Keep in mind that the security of your users' login credentials in such scenarios
116
133
also depends on the encryption strength of the UAM in use.
117
-
Consider eliminating weak UAMs like "ClearTxt Passwrd" and "Randnum exchange" entirely from your network.
118
134
119
135
## Netatalk UAM overview table
120
136
121
137
An overview of the officially supported UAMs on Macs.
122
138
123
-
| UAM | No User Auth | Cleartxt Passwrd | RandNum Exchange | DHCAST128 | DHX2 | Kerberos V |
| Password length | guest access | max 8 chars | max 8 chars | max 64 chars | max 256 chars | Kerberos tickets |
126
-
| Client support | built-in into all Mac OS versions | built-in in all Mac OS versions except 10.0. Has to be activated explicitly in later Mac OS X versions | built-in into almost all Mac OS versions | built-in since AppleShare client 3.8.4, available as a plug-in for 3.8.3, integrated in macOS's AFP client | built-in since Mac OS X 10.2 | built-in since Mac OS X 10.2 |
127
-
| Encryption | Enables guest access without authentication between client and server. | Password will be sent in cleartext over the wire. Just as bad as it sounds, therefore avoid at all if possible (note: providing NetBoot services requires the ClearTxt UAM) | 8-byte random numbers are sent over the wire, comparable with DES, 56 bits. Vulnerable to offline dictionary attack. Requires passwords in clear on the server. | Password will be encrypted with 128 bit CAST, user will be authenticated against the server but not vice versa. Therefore weak against man-in-the-middle attacks. | Password will be encrypted with 128 bit CAST in CBC mode. User will be authenticated against the server but not vice versa. Therefore weak against man-in-the-middle attacks. | Password is not sent over the network. Due to the service principal detection method, this authentication method is vulnerable to man-in-the-middle attacks. |
128
-
| Server support | uams_guest.so | uams_clrtxt.so | uams_randnum.so | uams_dhx.so | uams_dhx2.so | uams_gss.so |
129
-
| Password storage | None | Either system auth or PAM |Passwords stored in clear text in a separate text file | Either system auth or PAM | Either system auth or PAM | At the Kerberos Key Distribution Center |
139
+
| UAM | No User Auth | Cleartxt Passwrd | RandNum Exchange | DHCAST128 | DHX2 | Kerberos V | SRP |
| Password length | guest access | max 8 chars | max 8 chars | max 64 chars | max 256 chars | Kerberos tickets | max 256 chars |
142
+
| Client support | built-in into all Mac OS versions | built-in in all Mac OS versions except 10.0. Has to be activated explicitly in later Mac OS X versions | built-in into almost all Mac OS versions | built-in since AppleShare client 3.8.4, available as a plug-in for 3.8.3, integrated in macOS's AFP client | built-in since Mac OS X 10.2 | built-in since Mac OS X 10.2 | built-in since Mac OS X 10.7 |
143
+
| Encryption | Enables guest access without authentication between client and server. | Password will be sent in cleartext over the wire. Just as bad as it sounds, therefore avoid at all costs. | 8-byte random numbers are sent over the wire, comparable with DES, 56 bits. Vulnerable to offline dictionary attack. Requires passwords in clear on the server. | Password will be encrypted with 128 bit CAST, user will be authenticated against the server but not vice versa. Therefore weak against man-in-the-middle attacks. | Password will be encrypted with 128 bit CAST in CBC mode. User will be authenticated against the server but not vice versa. Therefore weak against man-in-the-middle attacks. | Password is not sent over the network. Due to the service principal detection method, this authentication method is vulnerable to man-in-the-middle attacks. | Password is never sent; SRP uses a verifier and mutual proofs (M1/M2) to authenticate both client and server, providing protection against man‑in‑the‑middle attacks. |
144
+
| Server support | uams_guest.so | uams_clrtxt.so | uams_randnum.so | uams_dhx.so | uams_dhx2.so | uams_gss.so | uams_srp.so |
145
+
| Password storage | None | Either system auth or PAM |Separate *afppasswd* file; raw hex or DES-encrypted with *.key*| Either system auth or PAM | Either system auth or PAM | At the Kerberos Key Distribution Center| In a separate *afppasswd.srp* verifier file|
130
146
131
147
Note that a number of open-source and other third-party AFP clients exist.
132
148
Refer to their documentation for a list of supported UAMs.
0 commit comments