SASLAUTHD(8)
SASLAUTHD(8) π
okay bestie, you found the saslauthd page β this is from the System Manager's Manual section, so grab a snack π because we're doing this properly.
β¨ NAME β¨
saslauthd β the sasl authentication server, aka the little daemon that says "yes queen" or "no ma'am" to your passwords π₯
π SYNOPSIS π
saslauthd -a authmech [-Tvdchlr] [-O option] [-m mux_path] [-n threads]
[-s size] [-t timeout]
that's the whole vibe, no cap π«Ά
π DESCRIPTION π
so saslauthd is a daemon process β like, it lives in the background being useful β and what it does is handle plaintext authentication requests on behalf of the SASL library. iconic behavior honestly π
the server is giving two roles at once, main character energy:
- it isolates all the code that needs superuser privileges into one single process (containment slay π )
- it can be used to provide proxy authentication services to clients that literally do not understand SASL based authentication
saslauthd should be started from the system boot scripts when going to multi-user mode. and listen β when it's running against a protected authentication database (e.g. the shadow mechanism), it must be run as the superuser. otherwise, it is recommended to run the daemon unprivileged as saslauth:saslauth, which requires the runtime directory to have root:saslauthd owner. not me knowing the whole permissions saga π
you can do that whole unprivileged thing by following these steps on machines using systemd(1):
- create directory
/etc/systemd/system/saslauthd.service.d/ - create file
/etc/systemd/system/saslauthd.service.d/user.confwith content
[Service]
User=saslauth
Group=saslauth
- Reload systemd service file: run
systemctl daemon-reload
periodt, that's the whole ritual π―οΈ
β Options β
okay so the β¨ruleβ¨ here: options named by lower-case letters configure the server itself. Upper-case options control the behavior of specific authentication mechanisms, and their applicability to a particular authentication mechanism is described down in the AUTHENTICATION MECHANISMS section. iykyk π«
-aauthmech β Useauthmechas the authentication mechanism. (peep the AUTHENTICATION MECHANISMS section below, bestie.) This parameter is mandatory β like, non-negotiable π₯-Ooption β A mechanism specific option (e.g.rimap hostnameorconfig file path)-Hhostname β The remote host to be contacted by therimapauthentication mechanism. (Deprecated, use-Oinstead β yes she's old, we don't use her anymore π)-mpath β Usepathas the pathname to the named socket to listen on for connection requests. This must be an absolute pathname, and MUST NOT include the trailing"/mux". note that the default for this value is"/var/state/saslauthd"(or what was specified at compile time) and that this directory must exist forsaslauthdto function. don't skip the directory, she will simply not work π-nthreads β Usethreadsprocesses for responding to authentication queries. (default:5) A value of zero will indicate thatsaslauthdshould fork an individual process for each connection. This can solve leaks that occur in some deployments π-ssize β Usesizeas the table size of the hash table (in kilobytes)-ttimeout β Usetimeoutas the expiration time of the authentication cache (in seconds)-Tβ Honour time-of-day login restrictions β°-hβ Show usage information-cβ Enable caching of authentication credentials-lβ Disable the use of a lock file for controlling access toaccept()-rβ Combine the realm with the login (with an'@'sign in between). e.g. login:"foo"realm:"bar"will get passed as login:"foo@bar". > heads up: note that the realm will still be passed, which may lead to unexpected behavior for authentication mechanisms that make use of the realm β however for mechanisms which don't, such asgetpwent, this is the only way to authenticate domain-specific users sharing the same userid. so like, know what you're doing π§-vβ Print the version number and available authentication mechanisms on standard error, then exit-dβ Debugging mode π
πΈ Logging πΈ
saslauthd logs its activities via syslogd using the LOG_AUTH facility. that's it, that's the log situation π
π AUTHENTICATION MECHANISMS π
saslauthd supports one or more "authentication mechanisms", dependent upon the facilities provided by the underlying operating system. the mechanism is selected by the -a flag from the following list of choices:
dce(AIX) β Authenticate using the DCE authentication environment.getpwent(All platforms) β Authenticate using thegetpwent()library function. Typically this authenticates against the local password file. See your system'sgetpwent(3)man page for details.kerberos4(All platforms) β Authenticate against the local Kerberos 4 realm. (See the NOTES section for caveats about this driver β and bestie, there ARE caveats π)kerberos5(All platforms) β Authenticate against the local Kerberos 5 realm.pam(Linux, Solaris) β Authenticate using Pluggable Authentication Modules (PAM).rimap(All platforms) β Forward authentication requests to a remote IMAP server. This driver connects to a remote IMAP server, specified using the-Oflag, and attempts to login (via an IMAP'LOGIN'command) using the credentials supplied to the local server. If the remote authentication succeeds the local connection is also considered to be authenticated. The remote connection is closed as soon as the tagged response from the'LOGIN'command is received from the remote server. the option parameter to the-Oflag describes the remote server to forward authentication requests to.hostnamecan be a hostname (imap.example.com) or a dotted-quad IP address (192.168.0.1). The latter is useful if the remote server is multi-homed and has network interfaces that are unreachable from the local IMAP server. The remote host is contacted on the'imap'service port. A non-default port can be specified by appending a slash and the port name or number to thehostnameargument. the-Oflag and argument are mandatory when using therimapmechanism. mandatory mandatory mandatory πshadow(AIX, Irix, Linux, Solaris) β Authenticate against the local "shadow password file". The exact mechanism is system dependent.saslauthdcurrently understands thegetspnam()andgetuserpw()library routines. Some systems honour the-Tflag.sasldb(All platforms) β Authenticate against the SASL authentication database. > note that this is probably not what you want to use, and is even disabled at compile-time by default. If you want to usesasldbwith the SASL library, you probably want to use thepwcheck_methodof"auxprop"along with thesasldbauxprop plugin instead. so like, don't πldap(All platforms that support OpenLDAP 2.0 or higher) β Authenticate against an ldap server. The ldap configuration parameters are read from/usr/local/etc/saslauthd.conf. The location of this file can be changed with the-Oparameter. See theLDAP_SASLAUTHDfile included with the distribution for the list of available parameters πsia(Digital UNIX) β Authenticate using the Digital Unix Security Integration Architecture (a.k.a. "enhanced security").
π¦ NOTES π¦
okay this is the important tea β β the kerberos4 authentication driver consumes considerable resources. To perform an authentication it must obtain a ticket granting ticket from the TGT server on every single authentication request. the Kerberos library routines that obtain the TGT also create a local ticket file, on the reasonable assumption that you will want to save the TGT for use by other Kerberos applications. These ticket files are unusable by saslauthd, however there is no way not to create them. The overhead of creating and removing these ticket files can cause serious performance degradation on busy servers. (Kerberos was never intended to be used in this manner, anyway.) like... she's trying her best but this was not the design ππ₯
π FILES π
/var/run/saslauthd/muxβ The default communications socket./usr/local/etc/saslauthd.confβ The default configuration file for ldap support.
π SEE ALSO π
passwd(1), getpwent(3), getspnam(3), getuserpw(3), sasl_checkpass(3), sia_authenticate_user(3),
and that's the page bestie, you ate that π«Ά this iconic little document is from CMU-SASL, dated 12 12 2005 β vintage, but make it slay πβ¨
π¦ where this page comes from
- alpine 3.22: cyrus-sasl-doc 2.1.28-r8 Β· BSD-3-Clause-Attribution AND BSD-4-Clause
- alpine 3.23: cyrus-sasl-doc 2.1.28-r9 Β· BSD-3-Clause-Attribution AND BSD-4-Clause
- alpine 3.24: cyrus-sasl-doc 2.1.28-r9 Β· BSD-3-Clause-Attribution AND BSD-4-Clause
- arch rolling: cyrus-sasl 2.1.28-4 Β· BSD-3-Clause-Attribution
- nixpkgs unstable: cyrus-sasl 2.1.28
- opensuse-leap 16.0: cyrus-sasl-saslauthd 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-saslauthd 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-saslauthd 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-saslauthd 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-saslauthd-bdb 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-saslauthd-bdb 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-saslauthd-bdb 2.1.28-160000.4.1 Β· BSD-4-Clause
- opensuse-leap 16.0: cyrus-sasl-saslauthd-bdb 2.1.28-160000.4.1 Β· BSD-4-Clause
- Copyright 1997-2001 Messaging Direct Ltd. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms