title: SQLite: Manually insert encrypted Password
body: <p>I have a question that is probably solved easily, but intense googling didn't quite help me. Problem is the following: I have a Rails application with an authentication system. The system works in such a way that there is an Admin user that can create other users. Problem is, I just reset my operation system and now everything needs to be hooked up again, including this Admin user. Before, you could just do it via the application, but this was not longer wanted any more. So now, you need to create the Admin user manually using sqlite3. So I need to do something like:</p>
  
  <p><code>sqlite3 db/development.sqlite3 "INSERT INTO users VALUES(1,'admin-name','admin-email','admin-password','admin-password',1,1,1,1)"</code></p>
  
  <p>But this obviously does not work, since "admin-password" is not encrypted. Trying to log on to the application then gives me</p>
  
  <p><code>BCrypt::Errors::InvalidHash in SessionsController#create</code></p>
  
  <p>as expected.</p>
  
  <p>How can I insert an encrypted password so I can log on to the application as Admin?</p>
  
  <p>I appreciate your help :-)
  Thank you and best regards!</p>