forked from restitux/mumble-wiki-export
-
Notifications
You must be signed in to change notification settings - Fork 0
/
How_to_set_up_an_LDAP_authenticator.html
180 lines (159 loc) · 6.21 KB
/
How_to_set_up_an_LDAP_authenticator.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<p>In this guide we explain how to setup LDAP authentication for murmurd (aka mumble-server).</p>
<h3>Prerequisites</h3>
<ul>
<li>A mumble server with a DNS record (mumble.example.com)</li>
<li>Enable ICE with password protection in ''/etc/mumble-server.ini'':</li>
</ul>
<p><pre><br />
ice="tcp -h 127.0.0.1 -p 6502"<br />
icesecretread=MySecretIcePass<br />
icesecretwrite=MySecretIcePass<br />
</pre></p>
<ul>
<li>An LDAP service account (cn=mumble,ou=dsa,dc=example,dc=com):</li>
</ul>
<p><pre><br />
$ ldapsearch -ZZ -x -H ldap://ldap.example.com -D "cn=mumble,ou=dsa,dc=example,dc=com" -b ou=people,dc=example,dc=com -W -s sub '(uid=myldapusername)' -LLL<br />
Enter LDAP Password: <br />
dn: uid=myldapusername,ou=people,dc=example,dc=com<br />
cn: User Name<br />
sn: Name<br />
givenName: User<br />
uid: myldapusername<br />
displayName: User Name<br />
objectClass: inetOrgPerson<br />
objectClass: organizationalPerson<br />
objectClass: person<br />
mail: myldapusername@example.com<br />
roomNumber: 111<br />
userPassword:: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX=<br />
</pre></p>
<p>NOTE: Setting up a unique roomNumber in LDAP is important since this is the field we are using for uniqueness in Mumble.</p>
<h3>Get the LDAP Authenticator</h3>
<ul>
<li>Download the LDAP authenticator and sample configuration:</li>
</ul>
<p><pre></p>
<ol>
<li>curl -s -OL <a href="https://raw.github.com/mumble-voip/mumble-scripts/master/Authenticators/LDAP/LDAPauth.py">https://raw.github.com/mumble-voip/mumble-scripts/master/Authenticators/LDAP/LDAPauth.py</a></li>
<li>curl -s -OL <a href="https://raw.github.com/mumble-voip/mumble-scripts/master/Authenticators/LDAP/LDAPauth.ini">https://raw.github.com/mumble-voip/mumble-scripts/master/Authenticators/LDAP/LDAPauth.ini</a></pre></li>
</ol>
<h3>Setup the LDAP Authenticator</h3>
<ul>
<li>Install the authenticator script:</li>
</ul>
<p><pre></p>
<ol>
<li>cp LDAPauth.py /usr/local/sbin/</li>
<li>chmod +x /usr/local/sbin/LDAPauth.py</pre></li>
</ol>
<ul>
<li>Install the config file:</li>
</ul>
<p><pre></p>
<ol>
<li>mkdir /etc/mumble-scripts</li>
<li>cp LDAPauth.ini /etc/mumble-scripts</pre></li>
</ol>
<ul>
<li>Edit the configuration (''/etc/mumble-scripts/LDAPauth.ini'') appropriately:</li>
</ul>
<p><pre><br />
[user]<br />
id_offset = 1000000000<br />
reject_on_error = True<br />
reject_on_miss = True</p>
<p>[ice]<br />
host = 127.0.0.1<br />
port = 6502<br />
slice = /usr/share/slice/Murmur.ice<br />
secret = MySecretIcePass<br />
watchdog = 30</p>
<p>[ldap]<br />
bind_dn = cn=mumble,ou=dsa,dc=example,dc=com<br />
bind_pass = MySecretLDAPPass<br />
ldap_uri = ldaps://ldap.example.com<br />
users_dn = ou=people,dc=example,dc=com<br />
discover_dn = false<br />
username_attr = uid<br />
number_attr = roomNumber<br />
display_attr = cn<br />
group_cn = cn=all,ou=groups,dc=example,dc=com<br />
group_attr = member<br />
provide_info = True<br />
mail_attr = mail<br />
provide_users = True</p>
<p>[murmur]<br />
servers = </p>
<p>[log]<br />
level =<br />
file = /var/log/mumble-server/LDAPauth.log</p>
<p>[iceraw]<br />
Ice.ThreadPool.Server.Size = 5<br />
</pre></p>
<p>NOTE: If you don't use ldap'''s''':// all the LDAP communication will be in the clear!</p>
<h3>Start LDAPAuth.py as a systemd service</h3>
<ul>
<li>Create a systemd service file under ''/etc/systemd/system/mumble-ldapauth.service'':</li>
</ul>
<p><pre><br />
[Unit]<br />
Description=LDAP Authentication Service for Mumble Server<br />
Documentation=https://github.com/mumble-voip/mumble-scripts/issues/19<br />
After=network.target mumble-server.service</p>
<p>[Service]<br />
Type=simple<br />
User=mumble-server<br />
Group=mumble-server<br />
WorkingDirectory=/etc/mumble-scripts<br />
ExecStart=/usr/local/sbin/LDAPauth.py<br />
StandardOutput=syslog<br />
StandardError=syslog</p>
<p>[Install]<br />
WantedBy=multi-user.target<br />
</pre></p>
<ul>
<li>Start and enable the service:</li>
</ul>
<p><pre></p>
<ol>
<li>systemctl daemon-reload</li>
<li>systemctl enable mumble-ldapauth.service</li>
<li>systemctl start mumble-ldapauth.service</pre></li>
</ol>
<ul>
<li>Verify:</li>
</ul>
<p><pre></p>
<ol>
<li>systemctl status mumble-ldapauth.service
<ul>
<li>mumble-ldapauth.service - LDAP Authentication Service for Mumble Server Loaded: loaded (/etc/systemd/system/mumble-ldapauth.service; enabled; vendor preset: enabled) Active: active (running) since Sun 2019-09-01 00:29:50 PDT; 3s ago Docs: <a href="https://github.com/mumble-voip/mumble-scripts/issues/19">https://github.com/mumble-voip/mumble-scripts/issues/19</a> Main PID: 2544 (python) Tasks: 12 (limit: 4915) Memory: 44.4M CGroup: /system.slice/mumble-ldapauth.service `-2544 python /usr/local/sbin/LDAPauth.py</li>
</ul></li>
</ol>
<p>Sep 01 00:29:50 chat systemd[1]: Started LDAP Authentication Service for Mumble Server.<br />
</pre></p>
<ul>
<li>Restart both services:</li>
</ul>
<p><pre></p>
<ol>
<li>systemctl restart mumble-{server,ldapauth}.service</pre></li>
</ol>
<h3>Connect to mumble</h3>
<p>Use these client settings:</p>
<ul>
<li>Address: '''mumble.example.com'''</li>
<li>Port: '''64738'''</li>
<li>Username: '''myldapusername'''</li>
<li>Label: '''My Mumble Server'''</li>
</ul>
<h3>References:</h3>
<hr />
<ul>
<li><a href="https://github.com/mumble-voip/mumble-scripts/tree/master/Authenticators/LDAP">https://github.com/mumble-voip/mumble-scripts/tree/master/Authenticators/LDAP</a></li>
<li><a href="https://www.skelleton.net/2014/10/16/setting-up-an-active-directory-authenticated-mumble-server/">https://www.skelleton.net/2014/10/16/setting-up-an-active-directory-authenticated-mumble-server/</a></li>
<li><a href="https://github.com/mumble-voip/mumble-scripts/issues/19">https://github.com/mumble-voip/mumble-scripts/issues/19</a></li>
<li><a href="https://stackoverflow.com/questions/13069634/python-daemon-and-systemd-service">https://stackoverflow.com/questions/13069634/python-daemon-and-systemd-service</a></li>
</ul>
<p><a href="Category:Documentation English">Category:Documentation English</a></p>