3 Acts as auth program for the "external" authentication module
4 http://code.google.com/p/mod-auth-external/
6 It makes sure that the given user name exists at the system
7 (with a UID > 1000) and that the password corresponds to
8 the password that is provided by the AuthExternalContext
9 directive in the apache configuration.
15 # Get provided username and password
16 username = os.environ.get('USER')
17 password = os.environ.get('PASS')
18 valid_password = os.environ.get('CONTEXT')
21 # We want to have a existing user ...
23 user_info = pwd.getpwnam(username)
28 if user_info.pw_uid < 1000:
29 # the system user has to have a UID above 1000
33 # ... and the password has to be as given above
34 if password != valid_password: