How to Change a User's Password on a Development Machine

From Expertiza_Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

The following commands change the 'admin' user's password when entered into the rails console.

The rails console can be entered with the command

./script/console

while in the Expertiza working directory.

u = User.find_by_name('admin')
u.clear_password = 'new_password'
u.clear_password_confirmation = 'new_password'
u.save
exit