# How do I create a change password using sha1?

**URL:** <https://www.ruby-forum.com/t/how-do-i-create-a-change-password-using-sha1/51743>\
**Category:** Rails\
**Created:** [January 6, 2006, 4:03pm UTC](https://www.ruby-forum.com/t/how-do-i-create-a-change-password-using-sha1/51743 "2006-01-06T16:03:08Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![frank](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3d9bf3/32.png) [@frank](https://www.ruby-forum.com/u/frank)\
**Post date:** [January 6, 2006, 4:03pm UTC](https://www.ruby-forum.com/t/how-do-i-create-a-change-password-using-sha1/51743/1 "2006-01-06T16:03:08Z")

</div>

Hello,

The problem I am having is I have a form where a user can edit their  
data that does not include their password.

I have another form that I allow them to change their password.

Both forms use the before\_update method that hashes the password. There  
is no password in the first form.

Am I making this too complicated?  
How do I call the hash\_password for only the second form?  
Both forms use the user model.

Thanks

Frank

---

<div class="post-metadata">

**Author:** ![frank](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3d9bf3/32.png) [@frank](https://www.ruby-forum.com/u/frank)\
**Post date:** [January 6, 2006, 4:12pm UTC](https://www.ruby-forum.com/t/how-do-i-create-a-change-password-using-sha1/51743/2 "2006-01-06T16:12:17Z")

</div>

Has anyone used this system in order to create Admin  
and Regular user roles? I haven’t figured out how to  
give a regular user access to more than one action.  
Say, they log-in, and can go to controller/action -  
but ONLY one as that is all the database table seems  
to allow for…anyone know how to fix this?

Here is a link to the system.  
[http://wiki.rubyonrails.com/rails/pages/LoginGeneratorACLSystem](http://wiki.rubyonrails.com/rails/pages/LoginGeneratorACLSystem)

* * *

Yahoo! DSL ? Something to write home about.  
Just $16.99/mo. or less.  
[dsl.yahoo.com](http://dsl.yahoo.com)

---

<div class="post-metadata">

**Author:** ![frank](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3d9bf3/32.png) [@frank](https://www.ruby-forum.com/u/frank)\
**Post date:** [January 6, 2006, 6:14pm UTC](https://www.ruby-forum.com/t/how-do-i-create-a-change-password-using-sha1/51743/3 "2006-01-06T18:14:02Z")

</div>

JM MC wrote:

> Has anyone used this system in order to create Admin  
> and Regular user roles? I haven’t figured out how to  
> give a regular user access to more than one action.  
> Say, they log-in, and can go to controller/action -  
> but ONLY one as that is all the database table seems  
> to allow for…anyone know how to fix this?
> 
> Here is a link to the system.  
> [Peak Obsession](http://wiki.rubyonrails.com/rails/pages/LoginGeneratorACLSystem)

I’ve been using the user/login\_engine system with good success. It can  
be a little tricky to set up if you don’t follow the directions, but it  
works well.

That system allows you to limit access to any controller/action pair in  
your system to users with any number of roles.

[http://rails-engines.org/](http://rails-engines.org/)

\_Kevin

---

<div class="post-metadata">

**Author:** ![frank](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3d9bf3/32.png) [@frank](https://www.ruby-forum.com/u/frank)\
**Post date:** [January 6, 2006, 6:36pm UTC](https://www.ruby-forum.com/t/how-do-i-create-a-change-password-using-sha1/51743/4 "2006-01-06T18:36:35Z")

</div>

I tried using this but had trouble getting it  
installed.  
Running ruby/script/plugin install login\_engine gave  
me a  
“ruby: no such file or directory – script/plugin  
error”

Have any trouble installing the engine/plugin?

— Kevin O. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> seems
> 
> > to allow for…anyone know how to fix this?
> > 
> > Here is a link to the system.

[http://wiki.rubyonrails.com/rails/pages/LoginGeneratorACLSystem](http://wiki.rubyonrails.com/rails/pages/LoginGeneratorACLSystem)

> your system to users with any number of roles.  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

* * *

Yahoo! DSL ? Something to write home about.  
Just $16.99/mo. or less.  
[dsl.yahoo.com](http://dsl.yahoo.com)

---

<div class="post-metadata">

**Author:** ![frank](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3d9bf3/32.png) [@frank](https://www.ruby-forum.com/u/frank)\
**Post date:** [January 6, 2006, 6:54pm UTC](https://www.ruby-forum.com/t/how-do-i-create-a-change-password-using-sha1/51743/5 "2006-01-06T18:54:38Z")

</div>

I do have Rails 1.0 and I don’t think I’ve installed a  
plugin before, no… I quickly looked on the RoR site  
for documentation on installing a plug in but didn’t  
find anything.

— James A. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > Running ruby/script/plugin install login\_engine
> > 
> > > JM MC wrote:
> > > 
> > > > but ONLY one as that is all the database table  
> > > > seems  
> > > > to allow for…anyone know how to fix this?
> > > > 
> > > > Here is a link to the system.

[http://wiki.rubyonrails.com/rails/pages/LoginGeneratorACLSystem](http://wiki.rubyonrails.com/rails/pages/LoginGeneratorACLSystem)

> > > That system allows you to limit access to any  
> > > Rails mailing list
> > 
> > * * *
> > 
> > * * *
> 
> Rails mailing list  
> removed\_email\_address@domain.invalid  
> [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)

* * *

Yahoo! DSL ? Something to write home about.  
Just $16.99/mo. or less.  
[dsl.yahoo.com](http://dsl.yahoo.com)

---

<div class="post-metadata">

**Author:** ![frank](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3d9bf3/32.png) [@frank](https://www.ruby-forum.com/u/frank)\
**Post date:** [January 6, 2006, 6:51pm UTC](https://www.ruby-forum.com/t/how-do-i-create-a-change-password-using-sha1/51743/6 "2006-01-06T18:51:37Z")

</div>

You’re definitely using Rails 1.0? Have you managed to install any  
other plugins?

- james

---

<div class="post-metadata">

**Author:** ![frank](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3d9bf3/32.png) [@frank](https://www.ruby-forum.com/u/frank)\
**Post date:** [January 6, 2006, 8:33pm UTC](https://www.ruby-forum.com/t/how-do-i-create-a-change-password-using-sha1/51743/7 "2006-01-06T20:33:51Z")

</div>

On Jan 6, 2006, at 9:49 AM, James A. wrote:

> > “ruby: no such file or directory – script/plugin  
> > error”

You need ro run it like this:

$ ruby script/plugin install login\_engine

and you might need to do a

$ script/plugin discover

to get an updated plugin listsing.

But calling the command like you did above is why you are getting an  
error.

Cheers-  
-EZra

> > > to
> > > 
> > > controller/action pair in  
> > > removed\_email\_address@domain.invalid  
> > > Just $16.99/mo. or less.  
> > > [http://lists.rubyonrails.org/mailman/listinfo/rails](http://lists.rubyonrails.org/mailman/listinfo/rails)  
> > > -Ezra Z.  
> > > Yakima Herald-Republic  
> > > WebMaster  
> > > [http://yakimaherald.com](http://yakimaherald.com)  
> > > 509-577-7732  
> > > removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![frank](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/3d9bf3/32.png) [@frank](https://www.ruby-forum.com/u/frank)\
**Post date:** [January 6, 2006, 7:08pm UTC](https://www.ruby-forum.com/t/how-do-i-create-a-change-password-using-sha1/51743/8 "2006-01-06T19:08:06Z")

</div>

I seem to recall that I had to give the plugin install script the Url  
for the SVN repository to get it to work. Look in the rails plugin wiki  
page for the address.

You will need to install the ‘engines’, ‘login\_engine’, and  
‘user\_engine’.

If you have a user model, make sure it follows the ‘UserController’  
(singluar) convention rather than the ‘UsersController’ (plural)  
convention. It will save you endless headaches.

\_Kevin
