Projet

Général

Profil

« Précédent | Suivant » 

Révision 65a2d8c1

Ajouté par Serghei Mihai (congés, retour 15/05) il y a environ 9 ans

initial config files

Voir les différences:

config/config-radius.sh
1
#!/bin/sh
2
# Do initial configuration of freeradius
3

  
4
set -e
5

  
6
CONF_DIR = '/etc/freeradius'
7
BASEDIR=`dirname $0`
8

  
9
service freeradius stop
10

  
11
cp "$CONF_DIR/sites-available/default" "$CONF_DIR/sites-available/default.backup"
12
cp "$BASEDIR/radius-default.conf" "$CONF_DIR/sites-available/default"
13

  
14
service freeradius start
15

  
16

  
17

  
18

  
config/config.ldif
1
dn: cn=config
2
objectClass: olcGlobal
3
cn: config
4
olcArgsFile: /var/run/slapd/slapd.args
5
olcPidFile: /var/run/slapd/slapd.pid
6
olcToolThreads: 1
7
olcLogLevel: none
8
olcServerId: 1
9

  
10
dn: cn=module{0},cn=config
11
objectClass: olcModuleList
12
cn: module{0}
13
olcModulePath: /usr/lib/ldap
14
olcModuleLoad: {0}back_hdb
15
olcModuleLoad: {1}back_monitor
16
olcModuleLoad: {2}back_mdb
17
olcModuleLoad: {3}accesslog
18
olcModuleLoad: {4}unique
19
olcModuleLoad: {5}refint
20
olcModuleLoad: {6}constraint
21
olcModuleLoad: {7}syncprov
22

  
23
dn: cn=schema,cn=config
24
objectClass: olcSchemaConfig
25
cn: schema
26

  
27
dn: olcDatabase={-1}frontend,cn=config
28
objectClass: olcDatabaseConfig
29
objectClass: olcFrontendConfig
30
olcDatabase: {-1}frontend
31
olcAccess: {0}to *
32
   by dn.exact=gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth manage
33
   by * break
34
olcAccess: {1}to dn.exact="" by * read
35
olcAccess: {2}to dn.base="cn=Subschema" by * read
36
olcSizeLimit: 500
37

  
38
dn: olcDatabase={0}config,cn=config
39
objectClass: olcDatabaseConfig
40
olcDatabase: {0}config
41
olcAccess: {0}to *
42
   by dn.exact=gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth manage 
43
   by * break
44
olcRootDN: cn=admin,cn=config
45

  
46
dn: olcDatabase={1}mdb,cn=config
47
objectClass: olcDatabaseConfig
48
objectClass: olcMdbConfig
49
olcSuffix: cn=config-accesslog
50
olcDbDirectory: /var/lib/ldap/config-accesslog/
51
# Allow reading accesslog only by root
52
olcAccess: {0}to * 
53
   by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" read 
54
   by * break
55

  
56
dn: olcDatabase={1}monitor,cn=config
57
objectClass: olcDatabaseConfig
58
objectClass: olcMonitorConfig
59
olcDatabase: {1}monitor
60
# Allow reading monitoring only by root
61
olcAccess: {0}to * 
62
   by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" read
63
   by * break
64

  
65
# Log all writes to the configuration
66
dn: olcOverlay={0}accesslog,olcDatabase={0}config,cn=config
67
objectClass: olcAccesslogConfig
68
objectClass: olcOverlayConfig
69
objectClass: olcConfig
70
objectClass: top
71
olcOverlay: {0}accesslog
72
olcAccessLogDB: cn=config-accesslog
73
olcAccessLogOps: writes
74
# log are conserved one year and purged every day
75
olcAccessLogPurge: 365+00:00 1+00:00
76
olcAccessLogOld: objectClass=olcConfig
config/radius-default.conf
1
client local {
2
       shortname = "Dynamic client"
3
       ipaddr = 192.168.5.224
4
       netmask = 32
5
       lifetime = 3600
6
       secret = mystrongsecret
7
}
8

  
9
#  Authorization. First preprocess (hints and huntgroups files),
10
#  then realms, and finally look in the "users" file.
11
#
12
#  Any changes made here should also be made to the "inner-tunnel"
13
#  virtual server.
14
#
15
#  The order of the realm modules will determine the order that
16
#  we try to find a matching realm.
17
#
18
#  Make *sure* that 'preprocess' comes before any realm if you 
19
#  need to setup hints for the remote radius server
20
authorize {
21

  
22
	#
23
	#  Security settings.  Take a User-Name, and do some simple
24
	#  checks on it, for spaces and other invalid characters.  If
25
	#  it looks like the user is trying to play games, reject it.
26
	#
27
	#  This should probably be enabled by default.
28
	#
29
	#  See policy.conf for the definition of the filter_username policy.
30
	#
31
#	filter_username
32

  
33
	#
34
	#  The preprocess module takes care of sanitizing some bizarre
35
	#  attributes in the request, and turning them into attributes
36
	#  which are more standard.
37
	#
38
	#  It takes care of processing the 'raddb/hints' and the
39
	#  'raddb/huntgroups' files.
40
	preprocess
41

  
42
	#
43
	#  If you want to have a log of authentication requests,
44
	#  un-comment the following line, and the 'detail auth_log'
45
	#  section, above.
46
	auth_log
47

  
48
	ldap
49

  
50
	#
51
	#  The chap module will set 'Auth-Type := CHAP' if we are
52
	#  handling a CHAP request and Auth-Type has not already been set
53
	chap
54

  
55
	#
56
	#  If the users are logging in with an MS-CHAP-Challenge
57
	#  attribute for authentication, the mschap module will find
58
	#  the MS-CHAP-Challenge attribute, and add 'Auth-Type := MS-CHAP'
59
	#  to the request, which will cause the server to then use
60
	#  the mschap module for authentication.
61
	mschap
62

  
63
	#
64
	#  If you have a Cisco SIP server authenticating against
65
	#  FreeRADIUS, uncomment the following line, and the 'digest'
66
	#  line in the 'authenticate' section.
67
	digest
68

  
69
	#
70
	#  The WiMAX specification says that the Calling-Station-Id
71
	#  is 6 octets of the MAC.  This definition conflicts with
72
	#  RFC 3580, and all common RADIUS practices.  Un-commenting
73
	#  the "wimax" module here means that it will fix the
74
	#  Calling-Station-Id attribute to the normal format as
75
	#  specified in RFC 3580 Section 3.21
76
#	wimax
77

  
78
	#
79
	#  Look for IPASS style 'realm/', and if not found, look for
80
	#  '@realm', and decide whether or not to proxy, based on
81
	#  that.
82
#	IPASS
83

  
84
	#
85
	#  If you are using multiple kinds of realms, you probably
86
	#  want to set "ignore_null = yes" for all of them.
87
	#  Otherwise, when the first style of realm doesn't match,
88
	#  the other styles won't be checked.
89
	#
90
	suffix
91
#	ntdomain
92

  
93
	#
94
	#  This module takes care of EAP-MD5, EAP-TLS, and EAP-LEAP
95
	#  authentication.
96
	#
97
	#  It also sets the EAP-Type attribute in the request
98
	#  attribute list to the EAP type from the packet.
99
	#
100
	#  As of 2.0, the EAP module returns "ok" in the authorize stage
101
	#  for TTLS and PEAP.  In 1.x, it never returned "ok" here, so
102
	#  this change is compatible with older configurations.
103
	#
104
	#  The example below uses module failover to avoid querying all
105
	#  of the following modules if the EAP module returns "ok".
106
	#  Therefore, your LDAP and/or SQL servers will not be queried
107
	#  for the many packets that go back and forth to set up TTLS
108
	#  or PEAP.  The load on those servers will therefore be reduced.
109
	#
110
	eap {
111
		ok = return
112
	}
113

  
114
	#
115
	#  Pull crypt'd passwords from /etc/passwd or /etc/shadow,
116
	#  using the system API's to get the password.  If you want
117
	#  to read /etc/passwd or /etc/shadow directly, see the
118
	#  passwd module in radiusd.conf.
119
	#
120
#	unix
121

  
122
	#
123
	#  Read the 'users' file
124
#	files
125

  
126
	#
127
	#  Look in an SQL database.  The schema of the database
128
	#  is meant to mirror the "users" file.
129
	#
130
	#  See "Authorization Queries" in sql.conf
131
#	sql
132

  
133
	#
134
	#  If you are using /etc/smbpasswd, and are also doing
135
	#  mschap authentication, the un-comment this line, and
136
	#  configure the 'smbpasswd' module.
137
#	smbpasswd
138

  
139
        exec
140
	#
141
	#  The ldap module will set Auth-Type to LDAP if it has not
142
	#  already been set
143

  
144
	#
145
	#  Enforce daily limits on time spent logged in.
146
#	daily
147

  
148
	#
149
	# Use the checkval module
150
#	checkval
151

  
152
	expiration
153
	logintime
154

  
155
	#
156
	#  If no other module has claimed responsibility for
157
	#  authentication, then try to use PAP.  This allows the
158
	#  other modules listed above to add a "known good" password
159
	#  to the request, and to do nothing else.  The PAP module
160
	#  will then see that password, and use it to do PAP
161
	#  authentication.
162
	#
163
	#  This module should be listed last, so that the other modules
164
	#  get a chance to set Auth-Type for themselves.
165
	#
166
	pap
167

  
168
	#
169
	#  If "status_server = yes", then Status-Server messages are passed
170
	#  through the following section, and ONLY the following section.
171
	#  This permits you to do DB queries, for example.  If the modules
172
	#  listed here return "fail", then NO response is sent.
173
	#
174
#	Autz-Type Status-Server {
175
#
176
#	}
177
}
178

  
179

  
180
#  Authentication.
181
#
182
#
183
#  This section lists which modules are available for authentication.
184
#  Note that it does NOT mean 'try each module in order'.  It means
185
#  that a module from the 'authorize' section adds a configuration
186
#  attribute 'Auth-Type := FOO'.  That authentication type is then
187
#  used to pick the apropriate module from the list below.
188
#
189

  
190
#  In general, you SHOULD NOT set the Auth-Type attribute.  The server
191
#  will figure it out on its own, and will do the right thing.  The
192
#  most common side effect of erroneously setting the Auth-Type
193
#  attribute is that one authentication method will work, but the
194
#  others will not.
195
#
196
#  The common reasons to set the Auth-Type attribute by hand
197
#  is to either forcibly reject the user (Auth-Type := Reject),
198
#  or to or forcibly accept the user (Auth-Type := Accept).
199
#
200
#  Note that Auth-Type := Accept will NOT work with EAP.
201
#
202
#  Please do not put "unlang" configurations into the "authenticate"
203
#  section.  Put them in the "post-auth" section instead.  That's what
204
#  the post-auth section is for.
205
#
206
authenticate {
207
	#
208
	#  PAP authentication, when a back-end database listed
209
	#  in the 'authorize' section supplies a password.  The
210
	#  password can be clear-text, or encrypted.
211
	Auth-Type PAP {
212
		pap
213
	}
214

  
215
	#
216
	#  Most people want CHAP authentication
217
	#  A back-end database listed in the 'authorize' section
218
	#  MUST supply a CLEAR TEXT password.  Encrypted passwords
219
	#  won't work.
220
	Auth-Type CHAP {
221
		chap
222
	}
223

  
224
	#
225
	#  MSCHAP authentication.
226
	Auth-Type MS-CHAP {
227
		mschap
228
	}
229

  
230
	#
231
	#  If you have a Cisco SIP server authenticating against
232
	#  FreeRADIUS, uncomment the following line, and the 'digest'
233
	#  line in the 'authorize' section.
234
	digest
235

  
236
	#
237
	#  Pluggable Authentication Modules.
238
#	pam
239

  
240
	#
241
	#  See 'man getpwent' for information on how the 'unix'
242
	#  module checks the users password.  Note that packets
243
	#  containing CHAP-Password attributes CANNOT be authenticated
244
	#  against /etc/passwd!  See the FAQ for details.
245
	#
246
	#  For normal "crypt" authentication, the "pap" module should
247
	#  be used instead of the "unix" module.  The "unix" module should
248
	#  be used for authentication ONLY for compatibility with legacy
249
	#  FreeRADIUS configurations.
250
	#
251
	unix
252

  
253
	# Uncomment it if you want to use ldap for authentication
254
	#
255
	# Note that this means "check plain-text password against
256
	# the ldap database", which means that EAP won't work,
257
	# as it does not supply a plain-text password.
258
	Auth-Type LDAP {
259
		ldap
260
	}
261

  
262
	#
263
	#  Allow EAP authentication.
264
	eap
265

  
266
	#
267
	#  The older configurations sent a number of attributes in
268
	#  Access-Challenge packets, which wasn't strictly correct.
269
	#  If you want to filter out these attributes, uncomment
270
	#  the following lines.
271
	#
272
#	Auth-Type eap {
273
#		eap {
274
#			handled = 1  
275
#		}
276
#		if (handled && (Response-Packet-Type == Access-Challenge)) {
277
#			attr_filter.access_challenge.post-auth
278
#			handled  # override the "updated" code from attr_filter
279
#		}
280
#	}
281
}
282

  
283

  
284
#
285
#  Pre-accounting.  Decide which accounting type to use.
286
#
287
preacct {
288
	preprocess
289

  
290
	#
291
	#  Session start times are *implied* in RADIUS.
292
	#  The NAS never sends a "start time".  Instead, it sends
293
	#  a start packet, *possibly* with an Acct-Delay-Time.
294
	#  The server is supposed to conclude that the start time
295
	#  was "Acct-Delay-Time" seconds in the past.
296
	#
297
	#  The code below creates an explicit start time, which can
298
	#  then be used in other modules.
299
	#
300
	#  The start time is: NOW - delay - session_length
301
	#
302

  
303
#	  update request {
304
#	  	FreeRADIUS-Acct-Session-Start-Time = "%{expr: %l - %{%{Acct-Session-Time}:-0} - %{%{Acct-Delay-Time}:-0}}"
305
#	}
306

  
307

  
308
	#
309
	#  Ensure that we have a semi-unique identifier for every
310
	#  request, and many NAS boxes are broken.
311
	acct_unique
312

  
313
	#
314
	#  Look for IPASS-style 'realm/', and if not found, look for
315
	#  '@realm', and decide whether or not to proxy, based on
316
	#  that.
317
	#
318
	#  Accounting requests are generally proxied to the same
319
	#  home server as authentication requests.
320
#	IPASS
321
	suffix
322
#	ntdomain
323

  
324
	#
325
	#  Read the 'acct_users' file
326
	files
327
}
328

  
329
#
330
#  Accounting.  Log the accounting data.
331
#
332
accounting {
333
	#
334
	#  Create a 'detail'ed log of the packets.
335
	#  Note that accounting requests which are proxied
336
	#  are also logged in the detail file.
337
	detail
338
#	daily
339

  
340
	#  Update the wtmp file
341
	#
342
	#  If you don't use "radlast", you can delete this line.
343
#	unix
344

  
345
	#
346
	#  For Simultaneous-Use tracking.
347
	#
348
	#  Due to packet losses in the network, the data here
349
	#  may be incorrect.  There is little we can do about it.
350
#	radutmp
351
#	sradutmp
352

  
353
	#  Return an address to the IP Pool when we see a stop record.
354
#	main_pool
355

  
356
	#
357
	#  Log traffic to an SQL database.
358
	#
359
	#  See "Accounting queries" in sql.conf
360
#	sql
361

  
362
	#
363
	#  If you receive stop packets with zero session length,
364
	#  they will NOT be logged in the database.  The SQL module
365
	#  will print a message (only in debugging mode), and will
366
	#  return "noop".
367
	#
368
	#  You can ignore these packets by uncommenting the following
369
	#  three lines.  Otherwise, the server will not respond to the
370
	#  accounting request, and the NAS will retransmit.
371
	#
372
#	if (noop) {
373
#		ok
374
#	}
375

  
376
	#
377
	#  Instead of sending the query to the SQL server,
378
	#  write it into a log file.
379
	#
380
#	sql_log
381

  
382
	#  Cisco VoIP specific bulk accounting
383
#	pgsql-voip
384

  
385
	# For Exec-Program and Exec-Program-Wait
386
	exec
387

  
388
	#  Filter attributes from the accounting response.
389
	attr_filter.accounting_response
390

  
391
	#
392
	#  See "Autz-Type Status-Server" for how this works.
393
	#
394
#	Acct-Type Status-Server {
395
#
396
#	}
397
}
398

  
399

  
400
#  Session database, used for checking Simultaneous-Use. Either the radutmp 
401
#  or rlm_sql module can handle this.
402
#  The rlm_sql module is *much* faster
403
session {
404
	radutmp
405

  
406
	#
407
	#  See "Simultaneous Use Checking Queries" in sql.conf
408
#	sql
409
}
410

  
411

  
412
#  Post-Authentication
413
#  Once we KNOW that the user has been authenticated, there are
414
#  additional steps we can take.
415
post-auth {
416
	#  Get an address from the IP Pool.
417
#	main_pool
418

  
419
	#
420
	#  If you want to have a log of authentication replies,
421
	#  un-comment the following line, and the 'detail reply_log'
422
	#  section, above.
423
#	reply_log
424

  
425
	#
426
	#  After authenticating the user, do another SQL query.
427
	#
428
	#  See "Authentication Logging Queries" in sql.conf
429
#	sql
430

  
431
	#
432
	#  Instead of sending the query to the SQL server,
433
	#  write it into a log file.
434
	#
435
#	sql_log
436

  
437
	#
438
	#  Un-comment the following if you have set
439
	#  'edir_account_policy_check = yes' in the ldap module sub-section of
440
	#  the 'modules' section.
441
	#
442
#	ldap
443

  
444
	# For Exec-Program and Exec-Program-Wait
445
	exec
446

  
447
	#
448
	#  Calculate the various WiMAX keys.  In order for this to work,
449
	#  you will need to define the WiMAX NAI, usually via
450
	#
451
	#	update request {
452
	#	       WiMAX-MN-NAI = "%{User-Name}"
453
	#	}
454
	#
455
	#  If you want various keys to be calculated, you will need to
456
	#  update the reply with "template" values.  The module will see
457
	#  this, and replace the template values with the correct ones
458
	#  taken from the cryptographic calculations.  e.g.
459
	#
460
	# 	update reply {
461
	#		WiMAX-FA-RK-Key = 0x00
462
	#		WiMAX-MSK = "%{EAP-MSK}"
463
	#	}
464
	#
465
	#  You may want to delete the MS-MPPE-*-Keys from the reply,
466
	#  as some WiMAX clients behave badly when those attributes
467
	#  are included.  See "raddb/modules/wimax", configuration
468
	#  entry "delete_mppe_keys" for more information.
469
	#
470
#	wimax
471

  
472
	#  If there is a client certificate (EAP-TLS, sometimes PEAP
473
	#  and TTLS), then some attributes are filled out after the
474
	#  certificate verification has been performed.  These fields
475
	#  MAY be available during the authentication, or they may be
476
	#  available only in the "post-auth" section.
477
	#
478
	#  The first set of attributes contains information about the
479
	#  issuing certificate which is being used.  The second
480
	#  contains information about the client certificate (if
481
	#  available).
482
#
483
#	update reply {
484
#	       Reply-Message += "%{TLS-Cert-Serial}"
485
#	       Reply-Message += "%{TLS-Cert-Expiration}"
486
#	       Reply-Message += "%{TLS-Cert-Subject}"
487
#	       Reply-Message += "%{TLS-Cert-Issuer}"
488
#	       Reply-Message += "%{TLS-Cert-Common-Name}"
489
#	       Reply-Message += "%{TLS-Cert-Subject-Alt-Name-Email}"
490
#
491
#	       Reply-Message += "%{TLS-Client-Cert-Serial}"
492
#	       Reply-Message += "%{TLS-Client-Cert-Expiration}"
493
#	       Reply-Message += "%{TLS-Client-Cert-Subject}"
494
#	       Reply-Message += "%{TLS-Client-Cert-Issuer}"
495
#	       Reply-Message += "%{TLS-Client-Cert-Common-Name}"
496
#	       Reply-Message += "%{TLS-Client-Cert-Subject-Alt-Name-Email}"
497
#	}
498

  
499
	#  MacSEC requires the use of EAP-Key-Name.  However, we don't
500
	#  want to send it for all EAP sessions.  Therefore, the EAP
501
	#  modules put required data into the EAP-Session-Id attribute.
502
	#  This attribute is never put into a request or reply packet.
503
	#
504
	#  Uncomment the next few lines to copy the required data into
505
	#  the EAP-Key-Name attribute
506
#	if (reply:EAP-Session-Id) {
507
#		update reply {
508
#			EAP-Key-Name := "%{reply:EAP-Session-Id}"
509
#		}
510
#	}
511

  
512
	#  If the WiMAX module did it's work, you may want to do more
513
	#  things here, like delete the MS-MPPE-*-Key attributes.
514
	#
515
	#	if (updated) {
516
	#		update reply {
517
	#			MS-MPPE-Recv-Key !* 0x00
518
	#			MS-MPPE-Send-Key !* 0x00
519
	#		}
520
	#	}
521

  
522
	#
523
	#  Access-Reject packets are sent through the REJECT sub-section of the
524
	#  post-auth section.
525
	#
526
	#  Add the ldap module name (or instance) if you have set 
527
	#  'edir_account_policy_check = yes' in the ldap module configuration
528
	#
529
	Post-Auth-Type REJECT {
530
		# log failed authentications in SQL, too.
531
#		sql
532
		attr_filter.access_reject
533
	}
534
}
535

  
536
#
537
#  When the server decides to proxy a request to a home server,
538
#  the proxied request is first passed through the pre-proxy
539
#  stage.  This stage can re-write the request, or decide to
540
#  cancel the proxy.
541
#
542
#  Only a few modules currently have this method.
543
#
544
pre-proxy {
545
#	attr_rewrite
546

  
547
	#  Uncomment the following line if you want to change attributes
548
	#  as defined in the preproxy_users file.
549
#	files
550

  
551
	#  Uncomment the following line if you want to filter requests
552
	#  sent to remote servers based on the rules defined in the
553
	#  'attrs.pre-proxy' file.
554
#	attr_filter.pre-proxy
555

  
556
	#  If you want to have a log of packets proxied to a home
557
	#  server, un-comment the following line, and the
558
	#  'detail pre_proxy_log' section, above.
559
#	pre_proxy_log
560
}
561

  
562
#
563
#  When the server receives a reply to a request it proxied
564
#  to a home server, the request may be massaged here, in the
565
#  post-proxy stage.
566
#
567
post-proxy {
568

  
569
	#  If you want to have a log of replies from a home server,
570
	#  un-comment the following line, and the 'detail post_proxy_log'
571
	#  section, above.
572
#	post_proxy_log
573

  
574
#	attr_rewrite
575

  
576
	#  Uncomment the following line if you want to filter replies from
577
	#  remote proxies based on the rules defined in the 'attrs' file.
578
#	attr_filter.post-proxy
579

  
580
	#
581
	#  If you are proxying LEAP, you MUST configure the EAP
582
	#  module, and you MUST list it here, in the post-proxy
583
	#  stage.
584
	#
585
	#  You MUST also use the 'nostrip' option in the 'realm'
586
	#  configuration.  Otherwise, the User-Name attribute
587
	#  in the proxied request will not match the user name
588
	#  hidden inside of the EAP packet, and the end server will
589
	#  reject the EAP request.
590
	#
591
	eap
592

  
593
	#
594
	#  If the server tries to proxy a request and fails, then the
595
	#  request is processed through the modules in this section.
596
	#
597
	#  The main use of this section is to permit robust proxying
598
	#  of accounting packets.  The server can be configured to
599
	#  proxy accounting packets as part of normal processing.
600
	#  Then, if the home server goes down, accounting packets can
601
	#  be logged to a local "detail" file, for processing with
602
	#  radrelay.  When the home server comes back up, radrelay
603
	#  will read the detail file, and send the packets to the
604
	#  home server.
605
	#
606
	#  With this configuration, the server always responds to
607
	#  Accounting-Requests from the NAS, but only writes
608
	#  accounting packets to disk if the home server is down.
609
	#
610
#	Post-Proxy-Type Fail {
611
#			detail
612
#	}
613
}
config/radius.ldif
1
# AUTO-GENERATED FILE - DO NOT EDIT!! Use ldapmodify.
2
# CRC32 f395ae99
3
dn: cn=radius,cn=schema,cn=config
4
objectClass: olcSchemaConfig
5
cn: radius
6
olcAttributeTypes: {0}( 1.3.6.1.4.1.3317.4.3.1.1 NAME 'radiusArapFeatures' D
7
 ESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SIN
8
 GLE-VALUE )
9
olcAttributeTypes: {1}( 1.3.6.1.4.1.3317.4.3.1.2 NAME 'radiusArapSecurity' D
10
 ESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SIN
11
 GLE-VALUE )
12
olcAttributeTypes: {2}( 1.3.6.1.4.1.3317.4.3.1.3 NAME 'radiusArapZoneAccess'
13
  DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 S
14
 INGLE-VALUE )
15
olcAttributeTypes: {3}( 1.3.6.1.4.1.3317.4.3.1.44 NAME 'radiusAuthType' DESC
16
  'checkItem: Auth-Type' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466
17
 .115.121.1.26 SINGLE-VALUE )
18
olcAttributeTypes: {4}( 1.3.6.1.4.1.3317.4.3.1.4 NAME 'radiusCallbackId' DES
19
 C 'replyItem: Callback-Id' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1
20
 466.115.121.1.26 SINGLE-VALUE )
21
olcAttributeTypes: {5}( 1.3.6.1.4.1.3317.4.3.1.5 NAME 'radiusCallbackNumber'
22
  DESC 'replyItem: Callback-Number' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6
23
 .1.4.1.1466.115.121.1.26 SINGLE-VALUE )
24
olcAttributeTypes: {6}( 1.3.6.1.4.1.3317.4.3.1.6 NAME 'radiusCalledStationId
25
 ' DESC 'checkItem: Called-Station-Id' EQUALITY caseIgnoreIA5Match SYNTAX 1.
26
 3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
27
olcAttributeTypes: {7}( 1.3.6.1.4.1.3317.4.3.1.7 NAME 'radiusCallingStationI
28
 d' DESC 'checkItem: Calling-Station-Id' EQUALITY caseIgnoreIA5Match SYNTAX 
29
 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
30
olcAttributeTypes: {8}( 1.3.6.1.4.1.3317.4.3.1.8 NAME 'radiusClass' DESC 're
31
 plyItem: Class' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121
32
 .1.26 )
33
olcAttributeTypes: {9}( 1.3.6.1.4.1.3317.4.3.1.45 NAME 'radiusClientIPAddres
34
 s' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
35
  SINGLE-VALUE )
36
olcAttributeTypes: {10}( 1.3.6.1.4.1.3317.4.3.1.9 NAME 'radiusFilterId' DESC
37
  'replyItem: Filter-Id' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466
38
 .115.121.1.26 )
39
olcAttributeTypes: {11}( 1.3.6.1.4.1.3317.4.3.1.10 NAME 'radiusFramedAppleTa
40
 lkLink' DESC 'replyItem: Framed-AppleTalk-Link' EQUALITY caseIgnoreIA5Match
41
  SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
42
olcAttributeTypes: {12}( 1.3.6.1.4.1.3317.4.3.1.11 NAME 'radiusFramedAppleTa
43
 lkNetwork' DESC 'replyItem: Framed-AppleTalk-Network' EQUALITY caseIgnoreIA
44
 5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
45
olcAttributeTypes: {13}( 1.3.6.1.4.1.3317.4.3.1.12 NAME 'radiusFramedAppleTa
46
 lkZone' DESC 'replyItem: Framed-AppleTalk-Zone' EQUALITY caseIgnoreIA5Match
47
  SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
48
olcAttributeTypes: {14}( 1.3.6.1.4.1.3317.4.3.1.13 NAME 'radiusFramedCompres
49
 sion' DESC 'replyItem: Framed-Compression' EQUALITY caseIgnoreIA5Match SYNT
50
 AX 1.3.6.1.4.1.1466.115.121.1.26 )
51
olcAttributeTypes: {15}( 1.3.6.1.4.1.3317.4.3.1.14 NAME 'radiusFramedIPAddre
52
 ss' DESC 'replyItem: Framed-IP-Address' EQUALITY caseIgnoreIA5Match SYNTAX 
53
 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
54
olcAttributeTypes: {16}( 1.3.6.1.4.1.3317.4.3.1.15 NAME 'radiusFramedIPNetma
55
 sk' DESC 'replyItem: Framed-IP-Netmask' EQUALITY caseIgnoreIA5Match SYNTAX 
56
 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
57
olcAttributeTypes: {17}( 1.3.6.1.4.1.3317.4.3.1.16 NAME 'radiusFramedIPXNetw
58
 ork' DESC 'replyItem: Framed-IPX-Network' EQUALITY caseIgnoreIA5Match SYNTA
59
 X 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
60
olcAttributeTypes: {18}( 1.3.6.1.4.1.3317.4.3.1.17 NAME 'radiusFramedMTU' DE
61
 SC 'replyItem: Framed-MTU' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1
62
 466.115.121.1.26 SINGLE-VALUE )
63
olcAttributeTypes: {19}( 1.3.6.1.4.1.3317.4.3.1.18 NAME 'radiusFramedProtoco
64
 l' DESC 'replyItem: Framed-Protocol' EQUALITY caseIgnoreIA5Match SYNTAX 1.3
65
 .6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
66
olcAttributeTypes: {20}( 1.3.6.1.4.1.3317.4.3.1.19 NAME 'radiusFramedRoute' 
67
 DESC 'replyItem: Framed-Route' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4
68
 .1.1466.115.121.1.26 )
69
olcAttributeTypes: {21}( 1.3.6.1.4.1.3317.4.3.1.20 NAME 'radiusFramedRouting
70
 ' DESC 'replyItem: Framed-Routing' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6
71
 .1.4.1.1466.115.121.1.26 SINGLE-VALUE )
72
olcAttributeTypes: {22}( 1.3.6.1.4.1.3317.4.3.1.46 NAME 'radiusGroupName' DE
73
 SC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
74
olcAttributeTypes: {23}( 1.3.6.1.4.1.3317.4.3.1.47 NAME 'radiusHint' DESC ''
75
  EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VA
76
 LUE )
77
olcAttributeTypes: {24}( 1.3.6.1.4.1.3317.4.3.1.48 NAME 'radiusHuntgroupName
78
 ' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 
79
 )
80
olcAttributeTypes: {25}( 1.3.6.1.4.1.3317.4.3.1.21 NAME 'radiusIdleTimeout' 
81
 DESC 'replyItem: Idle-Timeout' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4
82
 .1.1466.115.121.1.26 SINGLE-VALUE )
83
olcAttributeTypes: {26}( 1.3.6.1.4.1.3317.4.3.1.22 NAME 'radiusLoginIPHost' 
84
 DESC 'replyItem: Login-IP-Host' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.
85
 4.1.1466.115.121.1.26 )
86
olcAttributeTypes: {27}( 1.3.6.1.4.1.3317.4.3.1.23 NAME 'radiusLoginLATGroup
87
 ' DESC 'replyItem: Login-LAT-Group' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.
88
 6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
89
olcAttributeTypes: {28}( 1.3.6.1.4.1.3317.4.3.1.24 NAME 'radiusLoginLATNode'
90
  DESC 'replyItem: Login-LAT-Node' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.
91
 1.4.1.1466.115.121.1.26 SINGLE-VALUE )
92
olcAttributeTypes: {29}( 1.3.6.1.4.1.3317.4.3.1.25 NAME 'radiusLoginLATPort'
93
  DESC 'replyItem: Login-LAT-Port' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.
94
 1.4.1.1466.115.121.1.26 SINGLE-VALUE )
95
olcAttributeTypes: {30}( 1.3.6.1.4.1.3317.4.3.1.26 NAME 'radiusLoginLATServi
96
 ce' DESC 'replyItem: Login-LAT-Service' EQUALITY caseIgnoreIA5Match SYNTAX 
97
 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
98
olcAttributeTypes: {31}( 1.3.6.1.4.1.3317.4.3.1.27 NAME 'radiusLoginService'
99
  DESC 'replyItem: Login-Service' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1
100
 .4.1.1466.115.121.1.26 SINGLE-VALUE )
101
olcAttributeTypes: {32}( 1.3.6.1.4.1.3317.4.3.1.28 NAME 'radiusLoginTCPPort'
102
  DESC 'replyItem: Login-TCP-Port' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.
103
 1.4.1.1466.115.121.1.26 SINGLE-VALUE )
104
olcAttributeTypes: {33}( 1.3.6.1.4.1.3317.4.3.1.29 NAME 'radiusPasswordRetry
105
 ' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 
106
 SINGLE-VALUE )
107
olcAttributeTypes: {34}( 1.3.6.1.4.1.3317.4.3.1.30 NAME 'radiusPortLimit' DE
108
 SC 'replyItem: Port-Limit' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1
109
 466.115.121.1.26 SINGLE-VALUE )
110
olcAttributeTypes: {35}( 1.3.6.1.4.1.3317.4.3.1.49 NAME 'radiusProfileDn' DE
111
 SC '' EQUALITY distinguishedNameMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.12 
112
 SINGLE-VALUE )
113
olcAttributeTypes: {36}( 1.3.6.1.4.1.3317.4.3.1.31 NAME 'radiusPrompt' DESC 
114
 '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-
115
 VALUE )
116
olcAttributeTypes: {37}( 1.3.6.1.4.1.3317.4.3.1.50 NAME 'radiusProxyToRealm'
117
  DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 S
118
 INGLE-VALUE )
119
olcAttributeTypes: {38}( 1.3.6.1.4.1.3317.4.3.1.51 NAME 'radiusReplicateToRe
120
 alm' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.
121
 26 SINGLE-VALUE )
122
olcAttributeTypes: {39}( 1.3.6.1.4.1.3317.4.3.1.52 NAME 'radiusRealm' DESC '
123
 ' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-V
124
 ALUE )
125
olcAttributeTypes: {40}( 1.3.6.1.4.1.3317.4.3.1.32 NAME 'radiusServiceType' 
126
 DESC 'replyItem: Service-Type' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4
127
 .1.1466.115.121.1.26 SINGLE-VALUE )
128
olcAttributeTypes: {41}( 1.3.6.1.4.1.3317.4.3.1.33 NAME 'radiusSessionTimeou
129
 t' DESC 'replyItem: Session-Timeout' EQUALITY caseIgnoreIA5Match SYNTAX 1.3
130
 .6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
131
olcAttributeTypes: {42}( 1.3.6.1.4.1.3317.4.3.1.34 NAME 'radiusTerminationAc
132
 tion' DESC 'replyItem: Termination-Action' EQUALITY caseIgnoreIA5Match SYNT
133
 AX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE )
134
olcAttributeTypes: {43}( 1.3.6.1.4.1.3317.4.3.1.35 NAME 'radiusTunnelAssignm
135
 entId' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.
136
 1.26 )
137
olcAttributeTypes: {44}( 1.3.6.1.4.1.3317.4.3.1.36 NAME 'radiusTunnelMediumT
138
 ype' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.
139
 26 )
140
olcAttributeTypes: {45}( 1.3.6.1.4.1.3317.4.3.1.37 NAME 'radiusTunnelPasswor
141
 d' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26
142
  SINGLE-VALUE )
143
olcAttributeTypes: {46}( 1.3.6.1.4.1.3317.4.3.1.38 NAME 'radiusTunnelPrefere
144
 nce' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.
145
 26 )
146
olcAttributeTypes: {47}( 1.3.6.1.4.1.3317.4.3.1.39 NAME 'radiusTunnelPrivate
147
 GroupId' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.12
148
 1.1.26 )
149
olcAttributeTypes: {48}( 1.3.6.1.4.1.3317.4.3.1.40 NAME 'radiusTunnelServerE
150
 ndpoint' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.12
151
 1.1.26 )
152
olcAttributeTypes: {49}( 1.3.6.1.4.1.3317.4.3.1.41 NAME 'radiusTunnelType' D
153
 ESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
154
olcAttributeTypes: {50}( 1.3.6.1.4.1.3317.4.3.1.42 NAME 'radiusVSA' DESC '' 
155
 EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
156
olcAttributeTypes: {51}( 1.3.6.1.4.1.3317.4.3.1.43 NAME 'radiusTunnelClientE
157
 ndpoint' DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.12
158
 1.1.26 )
159
olcAttributeTypes: {52}( 1.3.6.1.4.1.3317.4.3.1.53 NAME 'radiusSimultaneousU
160
 se' DESC 'checkItem: Simultaneous-Use' SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
161
  SINGLE-VALUE )
162
olcAttributeTypes: {53}( 1.3.6.1.4.1.3317.4.3.1.54 NAME 'radiusLoginTime' DE
163
 SC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SING
164
 LE-VALUE )
165
olcAttributeTypes: {54}( 1.3.6.1.4.1.3317.4.3.1.55 NAME 'radiusUserCategory'
166
  DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 S
167
 INGLE-VALUE )
168
olcAttributeTypes: {55}( 1.3.6.1.4.1.3317.4.3.1.56 NAME 'radiusStripUserName
169
 ' DESC '' SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 SINGLE-VALUE )
170
olcAttributeTypes: {56}( 1.3.6.1.4.1.3317.4.3.1.57 NAME 'dialupAccess' DESC 
171
 '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-
172
 VALUE )
173
olcAttributeTypes: {57}( 1.3.6.1.4.1.3317.4.3.1.58 NAME 'radiusExpiration' D
174
 ESC 'checkItem: Expiration' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.
175
 1466.115.121.1.26 SINGLE-VALUE )
176
olcAttributeTypes: {58}( 1.3.6.1.4.1.3317.4.3.1.59 NAME 'radiusCheckItem' DE
177
 SC 'checkItem: $GENERIC$' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.14
178
 66.115.121.1.26 )
179
olcAttributeTypes: {59}( 1.3.6.1.4.1.3317.4.3.1.60 NAME 'radiusReplyItem' DE
180
 SC 'replyItem: $GENERIC$' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.14
181
 66.115.121.1.26 )
182
olcAttributeTypes: {60}( 1.3.6.1.4.1.3317.4.3.1.61 NAME 'radiusNASIpAddress'
183
  DESC '' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 S
184
 INGLE-VALUE )
185
olcAttributeTypes: {61}( 1.3.6.1.4.1.3317.4.3.1.62 NAME 'radiusReplyMessage'
186
  DESC 'replyItem: Reply-Message' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1
187
 .4.1.1466.115.121.1.26 )
188
olcObjectClasses: {0}( 1.3.6.1.4.1.3317.4.3.2.1 NAME 'radiusprofile' DESC ''
189
  SUP top AUXILIARY MUST cn MAY ( radiusArapFeatures $ radiusArapSecurity $ 
190
 radiusArapZoneAccess $ radiusAuthType $ radiusCallbackId $ radiusCallbackNu
191
 mber $ radiusCalledStationId $ radiusCallingStationId $ radiusClass $ radiu
192
 sClientIPAddress $ radiusFilterId $ radiusFramedAppleTalkLink $ radiusFrame
193
 dAppleTalkNetwork $ radiusFramedAppleTalkZone $ radiusFramedCompression $ r
194
 adiusFramedIPAddress $ radiusFramedIPNetmask $ radiusFramedIPXNetwork $ rad
195
 iusFramedMTU $ radiusFramedProtocol $ radiusCheckItem $ radiusReplyItem $ r
196
 adiusFramedRoute $ radiusFramedRouting $ radiusIdleTimeout $ radiusGroupNam
197
 e $ radiusHint $ radiusHuntgroupName $ radiusLoginIPHost $ radiusLoginLATGr
198
 oup $ radiusLoginLATNode $ radiusLoginLATPort $ radiusLoginLATService $ rad
199
 iusLoginService $ radiusLoginTCPPort $ radiusLoginTime $ radiusPasswordRetr
200
 y $ radiusPortLimit $ radiusPrompt $ radiusProxyToRealm $ radiusRealm $ rad
201
 iusReplicateToRealm $ radiusServiceType $ radiusSessionTimeout $ radiusStri
202
 pUserName $ radiusTerminationAction $ radiusTunnelClientEndpoint $ radiusPr
203
 ofileDn $ radiusSimultaneousUse $ radiusTunnelAssignmentId $ radiusTunnelMe
204
 diumType $ radiusTunnelPassword $ radiusTunnelPreference $ radiusTunnelPriv
205
 ateGroupId $ radiusTunnelServerEndpoint $ radiusTunnelType $ radiusUserCate
206
 gory $ radiusVSA $ radiusExpiration $ dialupAccess $ radiusNASIpAddress $ r
207
 adiusReplyMessage ) )
208
olcObjectClasses: {1}( 1.3.6.1.4.1.3317.4.3.2.2 NAME 'radiusObjectProfile' D
209
 ESC 'A Container Objectclass to be used for creating radius profile object'
210
  SUP top STRUCTURAL MUST cn MAY ( uid $ userPassword $ description ) )
config/reset-slapd.sh
1
#!/bin/sh
2
# Do initial configuration of slapd
3

  
4
set -e
5

  
6
BASEDIR=`dirname $0`
7

  
8
service slapd stop || true
9
BACKUPDIR="/var/backup/reset-ldap-`date +%Y%m%dT%H:%M:%S`"
10
mkdir -p "$BACKUPDIR"
11
echo Old configuration saved in $BACKUPDIR
12
cp -R /var/lib/ldap /etc/ldap/slapd.d/ "$BACKUPDIR"
13
rm -rf /var/lib/ldap/* /etc/ldap/slapd.d/*
14
mkdir /var/lib/ldap/config-accesslog/
15

  
16
echo Load overlay modules, configure auditlog for cn=config, create cn=monitor db
17
slapadd -n0 -F/etc/ldap/slapd.d -l"$BASEDIR/config.ldif"
18
slapadd -n0 -F/etc/ldap/slapd.d -l"/etc/ldap/schema/core.ldif"
19
slapadd -n0 -F/etc/ldap/slapd.d -l"/etc/ldap/schema/cosine.ldif"
20
slapadd -n0 -F/etc/ldap/slapd.d -l"/etc/ldap/schema/inetorgperson.ldif"
21
slapadd -n0 -F/etc/ldap/slapd.d -l"$BASEDIR/radius.ldif"
22

  
23
chown -R openldap.openldap /etc/ldap/slapd.d /var/lib/ldap
24

  
25
service slapd start
config/uauth
1
#!/bin/sh
2

  
3
ME=`basename $0`
4
COMMANDDIR=`dirname $0`/lib
5
test -d ${COMMANDDIR} || COMMANDDIR=/usr/lib/`basename $0`
6

  
7
help() {
8
        msg="$1"
9
        test -n "$msg" && echo $msg
10
        echo "syntaxe: $ME commande ..."
11
        echo ""
12
        echo "commandes disponibles:"
13
                echo "  help            cette aide"
14
        for fcom in $COMMANDDIR/*.help
15
        do
16
                com=`basename $fcom .help`
17
                descr=`head -1 $fcom`
18
                echo "  "$com"          "$descr
19
        done
20
        test -n "$msg" && exit 1
21
        exit 0
22
}
23

  
24
helpcmd() {
25
        command=$1
26
        xcommand=$COMMANDDIR/$command
27
        test -x $xcommand || help "ERR: commande inconnue ($command)"
28
        echo "$ME $command"
29
        cat $xcommand.help
30
}
31

  
32
command=$1
33
test -z $command && help "ERR: commande manquante"
34
shift
35

  
36
case $command in
37
        help)
38
                test -z "$1" && help
39
                helpcmd $1
40
                ;;
41
        *)
42
                xcommand=$COMMANDDIR/$command
43
                test -x $xcommand || help "ERR: commande inconnue ($command)"
44
                $xcommand "$@"
45
                ;;
46
esac

Formats disponibles : Unified diff