Manage Users
Register users on your TWiki site; change/reset/install passwords; remove user accountsOn this page:

Authentication and Access Control
- TWikiUserAuthentication describes your options for user authentication
- TWikiAccessControl describes how to define groups and how to restrict access to content
List Users
- TWikiUsers - list all registered users
- UserList - user list
- UserListByDateJoined - user list by date joined
- UserListByLocation - user list by location
Register Users
You don't have to have user profile pages in TWiki for Authentication to work - see TWikiUserAuthentication for details.- TWikiRegistration is used when you want new users to individually register with TWiki by filling out a form
- BulkRegistration to register multiple users at the same time
- Default user profile page form definition and template:
- UserForm in TWiki web - form definition (do not change)
- NewUserTemplate in TWiki web - template page (do not change)
- Customized user profile page form definition and template:
- UserForm in Main web - form definition (clone from the one in the TWiki web and customize)
- NewUserTemplate in Main web - template page (clone from the one in the TWiki web and customize)
Query and Edit User Account Data (Passwords, E-mails)
Note that the below features are only relevant when you use an internal password manager where TWiki can set and reset passwords.- ChangePassword is for users who can remember their password and want to change it
- ResetPassword is for users who cannot remember their password; a system generated password is e-mailed to them
- ChangeEmailAddress changes the hidden email address stored in the password file
- QueryUsers to query and edit user account data (password, e-mail etc)
- BulkResetPassword to reset many passwords at once
Changing User Account Names
To change the user's WikiName:- Rename the user profile page in the Main web, such as from
JaneSmith
toJaneMiller
.- Fix backlinks in the Main web only
- Make sure the group topics are updated (if any.)
- Edit the TWikiUsers topic and move the user's entry so that the list is in proper alphabetical order.
- Recreate the old topic with a pointer to the new topic, so that links in other webs work properly. Example content:
%M% Jane Smith is now known as JaneMiller
- The login name needs to be changed in the authentication server (e.g. Active Directory)
- In TWiki's TWikiUsers topic, fix the mapping from login name to WikiName:
* JaneSmith - jsmith - 13 Sep 2006
to:
* JaneMiller - jmiller - 13 Sep 2006
Removing User Accounts
To remove a user account (FredQuimby, who logs in as "fred"):- If you are using a
.htpasswd
file, edit the.htpasswd
file to delete the line startingfred:
- Warning: Do not use the Apache
htpasswd
program with.htpasswd
files generated by TWiki!htpasswd
wipes out email addresses that TWiki plants in the info fields of this file.
- Warning: Do not use the Apache
- Remove the
FredQuimby - fred
line from the Main.TWikiUsers topic - Remove
FredQuimby
from all groups and from all theALLOWWEB/ALLOWTOPIC...
declarations, if any.
Note: If you fail to do this you risk creating a security hole, as the next user to register with the wikiname FredQuimby will inherit the old FredQuimby's permissions. - [optional] Delete their user topic Main.FredQuimby (including attachments, if any.)
Customizing registration Emails.
TWiki's Registration can send 3 emails who's output is governed by templates:- User registration confirmation -
templates/registerconfirm.tmpl
- User registration notification -
templates/registernotify.tmpl
- Email to notify the TWiki admin of registration -
templates/registernotifyadmin.tmpl
templates
dir, this cannot use Template topics.
These template files have a specific format that matches the raw format of emails sent via SMTP, so be careful and test your changes. It is easiest to start by copying the default templates:
cd twiki/templates cp registernotify.tmpl registernotify.myskin.tmpl cp registerconfirm.tmpl registerconfirm.myskin.tmpl cp registernotifyadmin.tmpl registernotifyadmin.myskin.tmplthen add
myskin
to the beginning of the SKIN
setting in TWikiPreferences.
From this point on, your myskin templates will be used for the registration emails.
To make it possible for TWikiUsers to modify the email contents, you could use a parameterized %INCLUDE%
statement in your customized version. e.g.:
From: %WIKIWEBMASTERNAME% <%WIKIWEBMASTER%> To: %FIRSTLASTNAME% <%EMAILADDRESS%> Subject: %MAKETEXT{"[_1] - Registration for [_2] ([_3])" args="%WIKITOOLNAME%, %WIKINAME%, %EMAILADDRESS%"}% MIME-Version: 1.0 Content-Type: text/plain; charset=%CHARSET% Content-Transfer-Encoding: 8bit %INCLUDE{ "Main.RegistrationNotification" WIKINAME="%WIKINAME%" FIRSTLASTNAME="%FIRSTLASTNAME%" EMAILADDRESS="%EMAILADDRESS%" }%Note: The use of %WIKINAME%, %FIRSTLASTNAME%, %EMAILADDRESS% passed in from the INCLUDE so that the topic below is similar to the original template. And then create a topic Main.RegisterNotifyEmail:
Welcome to %WIKITOOLNAME%. %MAKETEXT{"Your personal [_1] topic is located at [_2]. You can customize it as you like:" args="%WIKITOOLNAME%, %SCRIPTURL{"view"}%/%USERSWEB%/%WIKINAME%"}% * %MAKETEXT{"Some people turn it into a personal portal with favorite links, what they work on, what help they'd like, etc."}% * %MAKETEXT{"Some add schedule information and vacation notice."}% Regards %WIKIWEBMASTERNAME% Your TWiki Admin %MAKETEXT{"Note:"}% 2 %MAKETEXT{"You can change your password at via [_1]" args="%SCRIPTURL{"view"}%/%SYSTEMWEB%/ChangePassword"}% 3 %MAKETEXT{"If you haven't set a password yet or you want to reset it, go to: [_1]" args="%SCRIPTURL{"view"}%/%SYSTEMWEB%/ResetPassword"}% %MAKETEXT{"Submitted content:"}% %FORMDATA%Note: Remember to secure the topic appropriately to prevent attackers from getting emailed sensitive passwords. Related topics: UserToolsCategory, AdminToolsCategory