Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: DanMB on November 09, 2015, 01:03:29 PM

Title: Newbie Mistake
Post by: DanMB on November 09, 2015, 01:03:29 PM
i changed my forum username (admin)
it said it will send me a password for the username switch it has not sent me one
Title: Re: Newbie Mistake
Post by: Kindred on November 09, 2015, 01:08:26 PM
is mail working, in general out of your forum?

http://wiki.simplemachines.org/smf/I_accidentally_lost_my_admin_account!_What_can_I_do
Title: Re: Newbie Mistake
Post by: DanMB on November 09, 2015, 01:11:18 PM
Quote from: Kindred on November 09, 2015, 01:08:26 PM
is mail working, in general out of your forum?

http://wiki.simplemachines.org/smf/I_accidentally_lost_my_admin_account!_What_can_I_do
nope i dont think maul is
Title: Re: Newbie Mistake
Post by: Kindred on November 09, 2015, 01:37:47 PM
well, that's another issue  first -- get your admin account back, active by doing that the FAQ says
Title: Re: Newbie Mistake
Post by: DanMB on November 09, 2015, 01:52:17 PM
Quote from: Kindred on November 09, 2015, 01:37:47 PM
well, that's another issue  first -- get your admin account back, active by doing that the FAQ says
does not seem to work
Title: Re: Newbie Mistake
Post by: Illori on November 09, 2015, 01:56:23 PM
what part of it is not working?
Title: Re: Newbie Mistake
Post by: DanMB on November 09, 2015, 01:57:37 PM
Quote from: Illori on November 09, 2015, 01:56:23 PM
what part of it is not working?
just comes up with the code when i type in the url
Title: Re: Newbie Mistake
Post by: Illori on November 09, 2015, 02:09:23 PM
what comes up with code when you type in what URL? some more details as to what exactly you are trying to do would help us help you.
Title: Re: Newbie Mistake
Post by: DanMB on November 09, 2015, 02:11:53 PM
Quote from: Illori on November 09, 2015, 02:09:23 PM
what comes up with code when you type in what URL? some more details as to what exactly you are trying to do would help us help you.
ok.
so i put the code in for smf2 so
<?php

// Pick a username to be the new admin user -- use the login name, not the display name
$yourusername = 'adminusername';

//---------------------------------------------------------------------------

// You should not need to change anything past this point in the script.
// Here we include SSI for globals used within the sql statement
include_once('SSI.php');

// Now run the query to elevate the user to administrator
// Also make sure that the account is activated!
$smcFunc['db_query']('', '
   UPDATE {db_prefix}members
   SET id_group = {int:admingrp},
      is_activated = {int:is_activated}
   WHERE member_name = {string:name}',
   array(
      'admingrp' => 1,
      'is_activated' => 1,
      'name' => $yourusername,
   )
);

echo $yourusername . ' should now be an admin';
?>
UPDATE {$db_prefix}_settings SET value = 0 WHERE variable = 'registration_method';

and when i type in
www.[myforumname].com/createadmin.php
it comes up with the code
Title: Re: Newbie Mistake
Post by: Kindred on November 09, 2015, 02:24:24 PM
I don't know what you are trying to do...   but you seem to have missed the point...

http://wiki.simplemachines.org/smf/I_accidentally_lost_my_admin_account!_What_can_I_do#Resetting_the_Password_of_an_Admin_User
Title: Re: Newbie Mistake
Post by: DanMB on November 09, 2015, 02:53:03 PM
Quote from: Kindred on November 09, 2015, 02:24:24 PM
I don't know what you are trying to do...   but you seem to have missed the point...

http://wiki.simplemachines.org/smf/I_accidentally_lost_my_admin_account!_What_can_I_do#Resetting_the_Password_of_an_Admin_User
ok does filezilla work
thats what im trying it with
Title: Re: Newbie Mistake
Post by: Kindred on November 09, 2015, 03:11:45 PM
no....   you need to do actions IN the database.... using phpmyadmin



Quote
Resetting the Password of an Admin User

Follow these instructions:

    Use phpMyAdmin (or similar) to locate (within the "_members" table) the member whose password is to be reset.
    In the database field entitled "passwd", enter a new password using plain text.
    Clear out (erase) any existing content in the database field entitled "password_salt".

The next time the member logs in (using the new password), SMF will automatically re-encrypt the user's credentials.