User Passwords: resetting, dumping, inspecting. - Snorby/snorby GitHub Wiki
Remember, the default user is "[email protected]" and the password is "snorby". You'll want to change this immediately after installation.
Login to your Snorby instance and go to "Settings". You'll be prompted for your name, email, password.
Finish by clicking Update Settings.
Dumping Users from localhost Snorby Database using 'userinteraction' password
mysqldump -u root -p snorby users > sqlusers.db
Restoring Users from localhost Snorby Database using 'userinteraction' password
mysql -u root -p snorby < sqlusers.db
AWS Migration Restoration after db:setup task is ran.
mysql -h snorbydb.a123j7aaf5rtg.us-east-1.rds.amazonaws.com --database=snorby -u snorby --password=sn0rBys3cr3tstuff < snorby_users.backup_epoch.sql
Note: your method of launching rails console in production may be significantly different.
/usr/local/www/snorby/$> script/rails c
-or-
Modern Bundle execution wrapper of rails gem bin
/usr/local/www/snorby/$> sudo -u www RAILS_ENV="production" bundle exec script/rails c
u = User.find_by_email("[email protected]")
u.password="NewUnencryptedPassword123"
u.password_confirmation="NewUnencryptedPassword123"
u.save
As a reference the snorby administrator is inserted via a datamapper database rake seed task db/seeds.rb
.
User.create(:name => 'Administrator', :email => '[email protected]', :password => 'snorby', :password_confirmation => 'snorby', :admin => true)
Current Schema of the Users table.
mysql> describe users;
+------------------------+------------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------------------+------------------+------+-----+---------------------+----------------+
| email | varchar(255) | NO | | | |
| encrypted_password | varchar(128) | NO | | | |
| remember_token | varchar(255) | YES | | NULL | |
| remember_created_at | datetime | YES | | NULL | |
| reset_password_token | varchar(255) | YES | | NULL | |
| sign_in_count | int(11) | YES | | 0 | |
| current_sign_in_at | datetime | YES | | NULL | |
| last_sign_in_at | datetime | YES | | NULL | |
| current_sign_in_ip | varchar(255) | YES | | NULL | |
| last_sign_in_ip | varchar(255) | YES | | NULL | |
| favorites_count | int(11) | YES | MUL | 0 | |
| accept_notes | int(11) | YES | | 1 | |
| notes_count | int(11) | YES | MUL | 0 | |
| id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| per_page_count | int(11) | YES | MUL | 25 | |
| name | varchar(50) | YES | | NULL | |
| timezone | varchar(50) | YES | | UTC | |
| admin | tinyint(1) | YES | | 0 | |
| enabled | tinyint(1) | YES | | 1 | |
| gravatar | tinyint(1) | YES | | 0 | |
| created_at | datetime | NO | | NULL | |
| updated_at | datetime | NO | | NULL | |
| avatar_file_name | varchar(255) | YES | | NULL | |
| avatar_content_type | varchar(255) | YES | | NULL | |
| avatar_file_size | int(11) | YES | | NULL | |
| avatar_updated_at | datetime | YES | | NULL | |
| online | tinyint(1) | YES | | 0 | |
| last_daily_report_at | datetime | YES | | 2013-12-27 20:43:59 | |
| last_weekly_report_at | int(11) | YES | | 201351 | |
| last_monthly_report_at | int(11) | YES | | 201312 | |
| last_email_report_at | datetime | YES | | NULL | |
| email_reports | tinyint(1) | YES | | 0 | |
+------------------------+------------------+------+-----+---------------------+----------------+