This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

respawnfreddy253188
respawnfreddy253188

Hey Guys,

I install October and wanna login in my /backend to change the theme and stuff. But i can't login it wont find my Username and my passwd. What can i do?

JeffGoldblum
JeffGoldblum

If you have command line access then run php artisan october:passwd admin MyNewPasswordHere and then login with admin and MyNewPasswordHere.

Alternatively if you have access to the database, change the email address of the superadmin user record in the backend_users table and then go through the reset password flow.

respawnfreddy253188
respawnfreddy253188

LukeTowers said:

If you have command line access then run php artisan october:passwd admin MyNewPasswordHere and then login with admin and MyNewPasswordHere.

Alternatively if you have access to the database, change the email address of the superadmin user record in the backend_users table and then go through the reset password flow.

I get that output The specified user does not exist.

JeffGoldblum
JeffGoldblum

Check the database for what user you do have there and then run that command replacing admin with either the username or the email of the user that does exist.

auzadventure
auzadventure

If you are still haven't trouble. I tried the command it was still suspended, so do this.

  1. Go to the database and delete the admin user account
  2. go to "\Backend\Database\Seeds\SeedSetupAdmin"
  3. comment out everything except for user::create (see below)
  4. check role table and select a role id, my role ID was 3 (change it below)
  5. run php artisan db:seed --class="\Backend\Database\Seeds\SeedSetupAdmin"

    /*UserRole::create([
        'name' => 'Publisher',
        'code' => UserRole::CODE_PUBLISHER,
        'description' => 'Site editor with access to publishing tools.',
    ]);
    
    $role = UserRole::create([
        'name' => 'Developer',
        'code' => UserRole::CODE_DEVELOPER,
        'description' => 'Site administrator with access to developer tools.',
    ]);
    
    $group = UserGroup::create([
        'name' => 'Owners',
        'code' => UserGroup::CODE_OWNERS,
        'description' => 'Default group for website owners.',
        'is_new_user_default' => false
    ]);
    */
    $user = User::create([
        'email'                 => static::$email,
        'login'                 => static::$login,
        'password'              => static::$password,
        'password_confirmation' => static::$password,
        'first_name'            => static::$firstName,
        'last_name'             => static::$lastName,
        'permissions'           => [],
        'is_superuser'          => true,
        'is_activated'          => true,
        'role_id'               => 3 //$role->id
    ]);
    
    //$user->addGroup($group);

Last updated

LucianDex
LucianDex

If you can access phpMyAdmin or other SQL manager. If you do not want to drop and recreate the database. Then You can run this SQL command:

INSERT INTO `backend_users` (`id`, `first_name`, `last_name`, `login`, `email`, `password`, `activation_code`, `persist_code`, `reset_password_code`, `permissions`, `is_activated`, `role_id`, `activated_at`, `last_login`, `created_at`, `updated_at`, `deleted_at`, `is_superuser`) VALUES
(1, 'Admin', 'Person', 'admin', 'admin@domain.tld', '', NULL, '', NULL, '', 1, 2, NULL, '2021-04-01 16:00:40', '2021-04-01 16:00:04', '2021-04-01 16:00:40', NULL, 1);

If number 1 (id) is taken in the table, change it to other, 2...3...4. In column password and persist_code leave blank '' as it is. The creation/update date-time it's up to you. Can be changed.

After the command complete successfull, go to project root folder (or where you can run php artisan command into a container/workspace). There run the command specified above php artisan october:passwd admin NEWPASS

Last updated

jobsmine
jobsmine

https://bcrypt-generator.com/ By using this the password field can be replaced and login can work!!

1-7 of 7

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.