1 # <a name="Manage Users"></a> Manage Users
3 _Register users on your TWiki site; change/reset/install passwords; remove user accounts_
7 <li><a href="#Manage Users"> Manage Users</a><ul>
8 <li><a href="#Authentication and Access Contro"> Authentication and Access Control</a></li>
9 <li><a href="#Register User"> Register User</a></li>
10 <li><a href="#Change, Reset and Install Passwo"> Change, Reset and Install Passwords</a></li>
11 <li><a href="#Changing User Account Names"> Changing User Account Names</a></li>
12 <li><a href="#Removing User Accounts"> Removing User Accounts</a></li>
13 <li><a href="#Customizing registration Emails."> Customizing registration Emails.</a></li>
19 %X% Some of the features below may be disabled, depending on your TWiki configuration.
21 ## <a name="Authentication and Access Contro"></a> Authentication and Access Control
23 - [[TWikiUserAuthentication]] describes your options for user authentication
24 - [[TWikiAccessControl]] describes how to define groups and how to restrict access to content
26 ## <a name="Register User"></a> Register User
28 You don't have to have user home pages in TWiki for Authentication to work - see [[TWikiUserAuthentication]] for details.
30 - [[TWikiRegistration]] is used when you want new users to individually register with TWiki by filling out a form
31 - You can create a custom versions of [[NewUserTemplate]] and [[UserForm]]
32 - [[BulkRegistration]] is used by administrators to register multiple users at the same time
34 ## <a name="Change, Reset and Install Passwo"></a> Change, Reset and Install Passwords
36 _Note that the below features are only relevant when you use an internal password manager where TWiki can set and reset passwords._
38 - [[ChangePassword]] is for users who _can_ remember their password and want to change it
39 - [[ResetPassword]] is for users who _cannot_ remember their password; a system generated password is e-mailed to them
40 - [[BulkResetPassword]] if for administrators who want to reset many passwords at once
41 - [[ChangeEmailAddress]] changes the hidden email address stored in the password file
43 ## <a name="Changing User Account Names"></a> Changing User Account Names
45 To change the user's [[WikiName]]:
47 - Rename the user's TWiki homepage in the Main web, such as from `JaneSmith` to `JaneMiller`.
48 - Fix backlinks in the Main web only
49 - Make sure the group topics are updated (if any.)
50 - Edit the [[Main.TWikiUsers|Main/TWikiUsers]] topic and move the user's entry so that the list is in proper alphabetical order.
51 - Recreate the old topic with a pointer to the new topic, so that links in other webs work properly. Example content:%BR% `%M% Jane Smith is now known as JaneMiller`
53 If external authentication is used and you want to change the login name:
55 - The login name needs to be changed in the authentication server (e.g. Active Directory)
56 - In TWiki's [[Main.TWikiUsers|Main/TWikiUsers]] topic, fix the mapping from login name to [[WikiName]]:%BR% ` * JaneSmith - jsmith - 13 Sep 2006` %BR% to: %BR% ` * JaneMiller - jmiller - 13 Sep 2006`
58 ## <a name="Removing User Accounts"></a> Removing User Accounts
60 To remove a user account (FredQuimby, who logs in as "fred"):
62 1. If you are using a `.htpasswd` file, edit the `.htpasswd` file to delete the line starting `fred:`
63 - **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.
64 2. Remove the `FredQuimby - fred` line from the Main.TWikiUsers topic
65 3. Remove `FredQuimby` from all groups and from all the `ALLOWWEB/ALLOWTOPIC...` declarations, if any.%BR% **_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.
66 4. _[optional]_ Delete their user topic Main.FredQuimby (including attachments, if any.)
68 **_Note:_** Consider leaving the user topic file in place so their past signatures and revision author entries don't end up looking like [[AnUncreatedTopic]]. If you want to make it clear the user is no longer around, replace the topic content with a note to that effect. The existence of the UserName topic should also prevent that user name from being re-used, sealing the potential security hole regarding inherited permissions..
70 ## <a name="Customizing registration Emails."></a> Customizing registration Emails.
72 TWiki's Registration can send 3 emails who's output is governed by templates:
74 1. User registration confirmation - `templates/registerconfirm.tmpl`
75 2. User registration notification - `templates/registernotify.tmpl`
76 3. Email to notify the TWiki admin of registration - `templates/registernotifyadmin.tmpl`
78 As these are [[TWikiTemplates]], they can be customized and selected using the SKIN path setting. Because there are default tmpl files in the `templates` dir, this cannot use Template topics.
80 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:
83 cp registernotify.tmpl registernotify.myskin.tmpl
84 cp registerconfirm.tmpl registerconfirm.myskin.tmpl
85 cp registernotifyadmin.tmpl registernotifyadmin.myskin.tmpl
87 then add `myskin` to the beginning of the `SKIN` setting in [[TWikiPreferences]].
89 From this point on, your myskin templates will be used for the registration emails.
91 To make it possible for [[TWikiUsers]] to modify the email contents, you could use a parameterized `%INCLUDE%` statement in your customized version. eg:
93 From: %WIKIWEBMASTERNAME% <%WIKIWEBMASTER%>
94 To: %FIRSTLASTNAME% <%EMAILADDRESS%>
95 Subject: %MAKETEXT{"[_1] - Registration for [_2] ([_3])" args="%WIKITOOLNAME%, %WIKINAME%, %EMAILADDRESS%"}%
97 Content-Type: text/plain; charset=%CHARSET%
98 Content-Transfer-Encoding: 8bit
101 "Main.RegistrationNotification"
102 WIKINAME="%WIKINAME%"
103 FIRSTLASTNAME="%FIRSTLASTNAME%"
104 EMAILADDRESS="%EMAILADDRESS%"
107 - **_note the use of %WIKINAME%, %FIRSTLASTNAME%, %EMAILADDRESS% passed in from the INCLUDE so that the topic below is similar to the original template_**
109 and then create a topic Main.RegisterNotifyEmail:
111 Welcome to %WIKITOOLNAME%.
113 %MAKETEXT{"Your personal [_1] topic is located at [_2]. You can customize it as you like:" args="%WIKITOOLNAME%, %SCRIPTURL{"view"}%/%USERSWEB%/%WIKINAME%"}%
115 * %MAKETEXT{"Some people turn it into a personal portal with favorite links, what they work on, what help they'd like, etc."}%
116 * %MAKETEXT{"Some add schedule information and vacation notice."}%
123 2 %MAKETEXT{"You can change your password at via [_1]" args="%SCRIPTURL{"view"}%/%SYSTEMWEB%/ChangePassword"}%
124 3 %MAKETEXT{"If you haven't set a password yet or you want to reset it, go to: [_1]" args="%SCRIPTURL{"view"}%/%SYSTEMWEB%/ResetPassword"}%
126 %MAKETEXT{"Submitted content:"}%
129 - **_remember to secure the topic appropriately to prevent attackers from getting emailed sensitive passwords._**
131 **_Related Topics:_** [[AdminDocumentationCategory]]