I have been trying to change my super admin password on my database through the phpmyadmin on MAMP (localhost), I have coded the password in MD5 format and even got the confirmation message. However that does not solve my problem, I am still unable to log in in the joomla administration panel - Password and Username doesn't match error.
Whats surprising is that even with the confirmation message, the phpmyadmin screen doesn't record the last reset time.
Is there something I'm doing wrong or any field that I should complete?
It's easier to create a new normal user and either make it the root user in your configuration.php or go into phpmyadmin and then add the new user to the super admin group.
Please try to execute the following query (changing "jos31" with your database prefix):
INSERT INTO `jos31_users`
(`name`, `username`, `password`, `params`)
VALUES ('Administrator2', 'admin2',
'433903e0a9d6a712e00251e44d29bf87:UJ0b9J5fufL3FKfCc0TLsYJBh2PFULvT', '');
INSERT INTO `jos31_user_usergroup_map` (`user_id`,`group_id`)
VALUES (LAST_INSERT_ID(),'8');
you could after login as: admin2 / admin
Another way is just paste the folowing password to your current super admin user and your new password will be: admin
433903e0a9d6a712e00251e44d29bf87:UJ0b9J5fufL3FKfCc0TLsYJBh2PFULvT
here is the complete tutorial
The one with 'secret' and 'admin' is found all around Internet. But there may be a situation when your Joomla site for some reason cannot change password in a normal way, and you don't want to go with "secret". Then there is another solution that's quite obvious, though maybe not for everyone...
You install Joomla 3* or whatever version you need (along with all its dependencies) ON YOUR LOCAL COMPUTER. During the setup you create your admin user/password. Now this is the password you want to use in your site where you've lost your Super User access. You just need to insert the HASH of that password into your site's MySQL db. So let's get that one now.
You go terminal/console, log in to mysql:
$mysql -u root -p
type in your password you've set up during the mysql installation.
Use your database name and db table prefix from your configuration.php in the root of your Joomla installation. Or you may remember them from your setup.
Then you derive your Super User password HASH from the db using this commands:
$mysql>USE $your_database_name;
$mysql>SELECT password from ${table_prefix}_users where name='Super User';
Now suppose your db name is "joomla" and your db_table prefix is "jehn34_".
Then your command will look like (don't forget the ";" at the end of each command!!!):
USE joomla;
SELECT password from jehn34_users where name='Super User';
You'll get your output like this:
+--------------------------------------------------------------+
| password |
+--------------------------------------------------------------+
| $OhMyGOODNESShereis02935468567$%^&*yourhashedpas0239u8i0e0jh |
+--------------------------------------------------------------+
1 row in set (0.00 sec)
You know your password for this one, so now you can now insert the string above into your MySQL Admin of your web-site in the corresponding field. Then you can use that password of yours.
Related
I know that technically, this question should be asked on phpStorm's forums, but being a popular IDE (I bet an eventual solution would also work for other popular IDEs from JetBrains), I'm thinking:
someone on SO might know and share the answer (faster than I'd get it from vendor)
the question answer might be useful and valuable to other coders (for that matter, even if I shall need to go on the vendor's forum I will get back with the answer here, when I find it)
If there is any need of context: I accidentally switched the connection type of a saved connection from ftp to local folder and when I switched back, the saved credentials were gone.
The question: Can I retrieve the saved password...
Angle 1: ...from this computer?
Angle 2: ...from another computer that has the same credentials saved, which I could access via TeamViewer, but has the password ●●●●●●(hidden)?
Edit: This method can only be used in the version of 2016.1 or before. For newer version (probably 2016.2), they changed the encode method. There is no clue for me to decode it.
Open C:\Users\.WebIde100\config\options\webServers.xml
Find your FTP and get the encrypted password from the password attribute.
Decrypt the password. I have written a PHP script to decrypt the string:
$pwd = "Your encrypted password here.";
$decrypted = '';
while (strlen($pwd) > 0) {
$decrypted .= chr(hexdec(substr($pwd, 0, 4)) ^ hexdec('dfaa'));
$pwd = substr($pwd, 4, strlen($pwd) - 1);
}
echo $decrypted;
If you trust my tools, you can use https://louislam.net/phpstorm-decrypt-password
If you use KeePass database file to store passwords, you can easely set password for that file, save and then open in KeePass manager, or migrate to other PHPStorm.
Go to Settings/Preferences | Appearance & Behavior | System Settings
| Passwords, enter new master password and save.
Open /.PhpStorm2017.1/config/c.kdbx (in "Keepass 2" or "Keeweb") with saved master password.
Here it is!
See answer here
Retrieve saved (hidden) SSH password from PhpStorm 2017.1
One way that just worked for me was to install Wireshark.
Use a capture filter of 'ftp', and do a "Test connection" inside PHPStorm.
Now stop the capture and examine what you've sniffed. The password will be in there.
I know this is a 1 year old question, but for everyone else, you can try to copy the selected (hidden) password with CTRL+C, and paste it in a text document (tested with 2016.3 on Debian).
For OSX users
Open keychain -> select the System Roots keychain (on the left side) -> search for IntelliJ.
If you click it you will see the ftp-username in the "Account" field. You can also use right click on the records to copy the password.
I am using Ion_Auth and I have a problem. I have looked for the solution but there is no progress yet.
As an example, there is a user and his name is Alex.
When Alex is logged in the portal, He should see his name Alex and then if he clicked his name, he will go to his user settings to edit his details. The problem is I can't show the first_name when a user have logged in.
How can I do that? I don't know what codes I can publish for this situation. Tell me what you need as code, I can publish if you need.
Having never used Ion_Auth, I decided to have a look at the repository on GitHub. You could use the user_id and pass this to a model method to get the first name (like umefarooq has suggested).
However, I would pull the first name from the database and store it in the session when the user logs in. This means you don't have to go back to the database just to get their name.
You can see in the Ion_auth model, this line;
$query = $this->db->select($this->identity_column . ', username, email, id, password, active, last_login')
https://github.com/benedmunds/CodeIgniter-Ion-Auth/blob/2/models/ion_auth_model.php#L985
You could just add the first name row to this query, and it will be added to the session when the user logs in.
You can then access it by:
$this->session->userdata('FirstName');
Hope this helps.
The easiest way is:
$user = $this->ion_auth->user()->row();
echo $user->first_name;
When the user logged in successfully, store his/her first name into the session variable.
then call the specific session variable on where you want to display.
NOTE: I am note DB Admin and I am not that much in sql server security
I am using MS SQL SERVER 2008R2
What I want to do is to give a user a minimal permissions or just what he required
I have a local user in my windows and I add this user in the logins of the database after that I went to this user in my specific database and try to change his set of permissions but the section is coming empty
why it is coming empty?
and how to do this, I mean giving him the permissions that he just need nothing more?
Please I want to do this from the user interface without T-sql
EDIT
I Just want to give the user read, write, execute nothing more
and also I need to know more about how to control users permissions in more details
A. Set up Read/Write
Go to Security/Logins and find your login, double click it
Go to user mapping, and click on the database that you have access to
In the bottom pane under 'Database Role Membership', tick db_datareader and db_datawriter
This gives the user Login SELECT, INSERT, UPDATE, DELETE
B. Revoke DELETE and grant EXECUTE
Create a role that does this:
Go to your database / Security / Roles
Right click, New / Database Role
Give the role a name, I will use executor for this example and press OK
I don't know how to do the next steps in SSMS, You'll need to do it in T-SQL:
Start a new query in your database
Type this and press F5:
GRANT EXECUTE TO executor;
DENY DELETE TO executor;
Now repeat A3 but select your newly created role, 'executor'
Every new user (or group) that you create needs to be a member of these three roles. The best practice is to add a windows group to SQL Server once, and add users to that windows group.
Lastly test this - I don't know for sure that it works.
With regards to the database user securables:
You have to explicitly populate this list to see what it contains. It doesn't populate automatically. Press Search and search for some objects (i.e. all objects belonging to the schema dbo). Now you have a list of objects in the top. Click on an object and click the 'Effecttive' tab on the bottom. This is the users effective (final) permissions for this object. If you want to override this at the object level you can assign something on the explicit tab
Had similar problem after our MSSQL Server was restored on a new server and wanted to set explicit permissions for a user in a DB.
Not sure how to make it default (as it appears to have been previously), but basically just hit the search button in the Securables tab you show to search for "All objects of the types..." and choose the Databases object and click ok / search. You should now see securables for that specific database and can set explicit permissions as well as view existing "effective" permissions.
in Admin panel , admin could add new admin users or manage existing ones .
the problem is when I try to change one of users password using ChangePassword control .after successful change , the logged in user is changed .
eg I log in as "admin1" . I go to UsersPage . I try to change "admin2"'s password . after that the name in Loginstatus control at the top of page that shows current user's name displays "admin2" !
Edit : I even tried it in a an empty project with just asp.net controls without a line of code but still current user changes after change password for any user
Edit : now I use ChangePassword method of membership instead of asp.net control and the problem is solved !
if i am not wrong, here is the anwser. "admin could add new admin users or manage existing ones ."
basically he is also a admin(admin 2 user), so when he's editing his password, asp.net membership will check for cookies.as the user(admin 2) has the permission to do changes,so the login control displaying (admin 2 user) name.
in behind the scenes, asp.net membership will check for the
particular user against whether he's in the specified role or not
(in this case "Admin" role).
if the user exist, in the role, then it will allow to do changes
How can you edit Joomla's articles in terminal?
Problem: to know the location where Joomla stores its articles
I tried to find articles unsuccessfully by
locate Masi | xargs -0 grep great
The articles are stored in the database in a table called jos_content. If you wanted to do a find and replace across them all, open a connection to the database (or use something like phpMyAdmin) and run something like this:
UPDATE `jos_content`
SET `introtext` = REPLACE(`introtext`, 'great', 'awesome'),
`fulltext` = REPLACE(`fulltext`, 'great', 'awesome')
Edit to help you debug the problem:
You won't be able to find "jos_content" in your codebase, because of a feature of Joomla which allows you to specify different table prefixes: "jos" is the default prefix. In the code, it's always written like this: #__content, and the DBO object converts that to "jos_content" behind the scenes.
However, you don't need to be looking in your code at all, just the database. You should be able to connect to the database - all the details you need will be in your configuration.php file.
If you're using Joomla 1.5, the variables you need are called $host, $user, $password and $db.
In Joomla 1.0, the variables are named $mosConfig_host, $mosConfig_user, $mosConfig_password and $mosConfig_db
There are a number of ways that you can connect to the database (check with your hosting company if you have phpMyAdmin available: it's quite easy to use), but to do it from the terminal (substitute in your own variables from above):
$ mysql -h $host -u $user -p$password -D $db
note that there's no space between the -p and the password. From there you should be able to run your own SQL, but I would highly recommend making a backup before you do any manual changes.
Joomla stores articles in a MySQL database. If you want to read/modify/delete articles you'll have to use SQL queries.
If you're determined to do this from a terminal, you could always start the mysql client from the command line and execute your queries from there.