summaryrefslogtreecommitdiffstats
path: root/gnome-help/C/user-forgottenpassword.page
blob: 6d64e4de8430a980f5c48e8d2215d4794294c461 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
<page xmlns="http://projectmallard.org/1.0/"
      type="topic" style="problem"
      id="user-forgottenpassword">

  <info>
    <link type="guide" xref="user-accounts#passwords"/>
    <desc>Reset a forgotten password.</desc>
    <revision pkgversion="3.0" version="0.1" date="2011-2-22" status="review"/>
    <credit type="author">
      <name>GNOME Documentation Project</name>
      <email>gnome-doc-list@gnome.org</email>
    </credit>

    <include href="legal.xml" xmlns="http://www.w3.org/2001/XInclude"/>
  </info>

  <title>I forgot my password!</title>
  <p>
     It is important to not only choose <link xref="user-goodpassword">a good and secure password</link>, but one that you can also remember.  In the event that you have forgotten the password to login to your computer account, you can follow the following steps to reset it.
  </p>
  <note style="important">
  <p>
     If you have an encrypted home directory, you will not be able to reset a forgotten password.
  </p>
  </note>
  <p>
  If you simply want to change your password, see <link xref="user-changepassword"/>.
  </p>
  <section id="reset-password-grub2"><title>Reset password on Grub2 systems</title>
     <steps>
         <item>
           <p>
           Restart your computer, and hold down the <key>Shift</key> during bootup to get into the grub menu.
           </p>
           <note style="tip">
           <p>
           If you have a dual-boot machine and you choose at boot time which operating system to boot into, the grub menu should appear without the need to hold down the <key>Shift</key> key.
           </p>
           </note>
           <note>
           <p>If you are unable to get into the Grub boot menu, and therefore cannot edit any linux kernel lines, you can <link xref="#live-cd">use a live CD to reset your user password</link>.
           </p>
           </note>
          </item>
          <item>
           <p>
           Press <key>e</key> to edit the line that begins with the word 'linux'.  This line may actually be wrapped onto a second line.
           </p>
          </item>
          <item>
           <p>
           Add <cmd>init = /bin/sh</cmd> to the end of the line.
           </p>
          </item>
          <item>
           <p>
           Press <keyseq><key>Ctrl</key><key> x </key></keyseq> to boot.
           </p>
          </item>
          <item>
           <p>
           At the <cmd>#</cmd> symbol, type:
           </p>
           <p>
           <cmd>mount -o remount, rw /</cmd>
           </p>
          </item>
          <item>
           <p>
           At the next <cmd>#</cmd> symbol type:
           </p>
           <p>
           <cmd>passwd username</cmd>, where username is the username of the password you are changing.
           </p>
           <note>
           <p>
               Debian systems do not have a <cmd>root</cmd> password.  Therefore, on Debian systems you would always be changing the password of a particular username, never root.
           </p>
           </note>
          </item>
          <item>
           <p>
           You will be prompted to enter a new UNIX password, and to confirm the new password.
           </p>
          </item>
          <item>
           <p>
           Once the password has been successfully changed:
           </p>
           <p>
           # <cmd>mount -o remount, ro /</cmd>
           </p>
          </item>
          <item>
           <p>
           Then:
           </p>
           <p>
           # <cmd>reboot -f</cmd>
           </p>
          </item>
     </steps>
     <p>
       After you successfully login, you will not be able to access your keyring (since you don't remember the old password).  This means that all your saved passwords for wireless networks, jabber accounts, etc. will no longer be accessible.  You will need to <link xref="#delete-keyring">delete the old keyring</link> and start a new one.
     </p>
  </section>
    <section id="reset-password-grub1"><title>Reset password on Grub systems</title>
     <steps>
         <item>
           <p>
           Restart your computer, and press the <key>Esc</key> during bootup to get into the grub menu.
           </p>
           <note style="tip">
           <p>
           If you have a dual-boot machine and you choose at boot time which operating system to boot into, the grub menu should appear without the need to hold down the <key>Esc</key> key.
           </p>
           </note>
           <note>
           <p>If you are unable to get into the Grub boot menu, and therefore cannot edit any linux kernel lines, you can <link xref="#live-cd">use a live CD</link> to reset your user password.
           </p>
           </note>
          </item>
          <item>
           <p>
           Press <key>e</key> to edit the line that begins with the word 'kernel'.  This line may actually be wrapped onto a second line.
           </p>
          </item>
          <item>
           <p>
           Add <cmd>init = /bin/sh</cmd> to the end of the line.
           </p>
          </item>
          <item>
           <p>
           Press <key>b</key> to boot.
           </p>
          </item>
          <item>
           <p>
           At the <cmd>#</cmd> symbol, type:
           </p>
           <p>
           <cmd>mount -o remount, rw /</cmd>
           </p>
          </item>
          <item>
           <p>
           At the next <cmd>#</cmd> symbol type:
           </p>
           <p>
           <cmd>passwd username</cmd>, where username is the username of the password you are changing.
           </p>
           <note>
           <p>
               Debian systems do not have a <cmd>root</cmd> password.  Therefore, on Debian systems you would always be changing the password of a particular username, never root.
           </p>
           </note>
          </item>
          <item>
           <p>
           You will be prompted to enter a new UNIX password, and to confirm the new password.
           </p>
          </item>
          <item>
           <p>
           Once the password has been successfully changed:
           </p>
           <p>
           # <cmd>mount -o remount, ro /</cmd>
           </p>
          </item>
          <item>
           <p>
           Then:
           </p>
           <p>
           # <cmd>reboot -f</cmd>
           </p>
          </item>

     </steps>
     <p>
       After you successfully login, you will not be able to access your keyring (since you don't remember the old password).  This means that all your saved passwords for wireless networks, jabber accounts, etc. will no longer be accessible.  You will need to <link xref="#delete-keyring">delete the old keyring</link> and start a new one.
     </p>
  </section>
    <section id="reset-password-live-cd"><title>Reset password using a Live CD or USB</title>
     <steps>
         <item>
           <p>
           Boot the Live CD or USB.
           </p>
          </item>
          <item>
           <p>
           Mount your drive.
           </p>
          </item>
          <item>
           <p>
           Press <keyseq><key>Alt</key><key>F2</key></keyseq> to get the <gui>Run Application</gui> dialog.
           </p>
          </item>
          <item>
           <p>
           Type <cmd>gksudo nautilus</cmd> to launch the file manager with system-wide privileges.
           </p>
           <note style="tip">
           <p>
             Within the drive you just mounted, you can check that it is the right drive by clicking <gui> home </gui> and then your username.
           </p>
           </note>
          </item>
          <item>
           <p>
           Go to the top-level directory of the mounted drive.  Then go into the <gui>etc</gui> directory.
           </p>
           <p>
           Locate the 'shadow' file and make a backup copy:
           </p>
           <steps>
           <item><p>
           Make sure the <gui>Icon view</gui> is selected.
           </p></item>

           <item><p>
           Right-click on the shadow file and select <gui>copy</gui>.
           </p></item>
           <item><p>
            Then right-click in the empty space and select <gui>paste</gui>.
           </p></item>

           <item><p>
                      <link xref="files-renaming">Rename</link> the backup "shadow.bak".
           </p></item>
           </steps>
          </item>


          <item>
           <p>
           Edit the original "shadow" file with a text editor.
           </p>
          </item>

          <item>
           <p>
           Find your username in for which you have forgotten the password.  It should look something like this (the characters after the colon will be different):
           </p>
           <p>
           username:$1$2abCd0E or
           </p>
            <p>
           username:$1$2abCd0E:13721a:0:99999:7:::
           </p>
          </item>
          <item>
           <p>
        Replace the characters after the first colon (and before the second colon if it applies) with the hash for a blank password: U6aMy0wojraho
           </p>
           <p>
           Save the file, exit out of everything and reboot your computer without the live CD or USB.
           </p>
          </item>
          <item>
           <p>
           When you boot back into your installation, type 'about me' in the <gui>Activities</gui> overview.  Open <gui>About Me</gui> and reset your password.
           </p>
          </item>
          <item>
          <p>
            For <gui>Current password</gui> do not enter anything, as your current password is blank.  Just click <gui>Authenticate</gui> and enter a new password. 
          </p>
          </item>

     </steps>
     <p>
       After you successfully login, you will not be able to access your keyring (since you don't remember the old password).  This means that all your saved passwords for wireless networks, jabber accounts, etc. will no longer be accessible.  You will need to <link xref="#delete-keyring">delete the old keyring</link> and start a new one.
     </p>
  </section>


  <section id="delete-keyring">
    <title>Get Rid of the Keyring Manager</title>

  <steps>
   <item><p>
    Go to your Home folder by typing 'home' in the <gui>Activities</gui> overview.
   </p></item>
   <item><p>
    Press <keyseq><key>Ctrl</key><key>h</key></keyseq> (or click <guiseq><gui>View</gui><gui>Show Hidden Files</gui></guiseq>.)
   </p></item>
   <item><p>
    Double click on the folder .gnome2
   </p></item>
   <item><p>
   Double click on the folder called keyrings.
   </p></item>
   <item><p>
   Delete any files you find in the keyrings folder.
   </p></item>
   <item><p>
   Restart the computer.
   </p></item>
 </steps>
<p>
After you restart and login you will be asked to enter your wireless networks password.
</p>
  </section>

  <comment>
   <cite date="2010-10-31" href="mailto:gnome-doc-list@gnome.org">GNOME Documentation Project</cite>
   <p>Instruction on what to do if the user forgets his/her password. Mention possible side-effects of changing the password.</p>
  </comment>

</page>