TIP PasswdUserContrib is not installed on Foswiki.org.


Use getpwnam to get passwords from /etc/passwd

The module uses the standard getpw* functions to check passwords against the /etc/passwd file. Thus any user who has an entry in /etc/passwd on your server is able to log in to the wiki. It is intended for use with the TemplateLogin manager.

This module will only work with passwords that are stored in /etc/passwd. Most systems use shadow passwords, and the getpwnam call that this module uses to access the password only checks for the password in the /etc/passwd file.

You can get a good idea whether the module will work for you by running a small fragment of perl as the Apache user
perl -e 'for (1..10) { print join(" ",getpwent),"\n" }'
This will print the first 10 entries in /etc/passwd. If the second field of each user entry is always 'x', then you probably can't access the passwords this way.

Note that /etc/passwd is read-only, and you will not be able to add users, change or reset passwords from Foswiki.

Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. Use "Find More Extensions" to get a list of available extensions. Select "Install".

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See http://foswiki.org/Support/ManuallyInstallingExtensions for more help.

  • Use the TemplateLogin login manager
  • {AllowLoginName} should be set to 1


Many thanks to the following sponsors for supporting this work:
  • Wind River Systems Inc.

Author(s): Crawford Currie http://c-dot.co.uk
Copyright: © 2010 Foswiki Contributors
License: GPL (Gnu General Public License)
Release: 1.0.0
Version: 7526 (2010-05-24)
Change History:  
Dependencies: None
Home page: http://foswiki.org/bin/view/Extensions/PasswdUserContrib
Support: http://foswiki.org/bin/view/Support/PasswdUserContrib

Topic revision: r3 - 30 Nov 2010, CrawfordCurrie
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy