Super user back end denied Topic is solved

Moderators: mandville, PhilD, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
JP59
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Dec 08, 2019 2:42 pm

Super user back end denied

Post by JP59 » Sun Dec 08, 2019 3:00 pm

Hello,

I think I made a mystake changing the rights of guest user in ACL.
Now I can't access the administrator part of my site. When I try to log in, I have a message saying I can't access the administration part of the site.

How can I change the ACL rights for the super user without logging in the site.

I can use phpmyadmin to access the database but I don't see something useful in it.
I can access to all the files with FTP but I don't know what I have to search for.

I need help.

Thanks for any help.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 37783
Joined: Sat Apr 05, 2008 9:58 pm

Re: Super user back end denied

Post by Webdongle » Sun Dec 08, 2019 3:59 pm

#__users ... find the ID for your user
#__usergroups ... find the ID for Super users
#__usergroup_map ... make sure your the Group ID for your user ID matches the ID for Super User
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

JP59
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Dec 08, 2019 2:42 pm

Re: Super user back end denied

Post by JP59 » Sun Dec 08, 2019 6:37 pm

All is OK in these tables of the db

I think the trouble is that super user can't access administrator pages of the site.

How can I change that ?

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8448
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Super user back end denied

Post by sozzled » Sun Dec 08, 2019 6:58 pm

JP59 wrote:
Sun Dec 08, 2019 6:37 pm
I think the trouble is that super user can't access administrator pages of the site.
Yes, we understand that the superuser account cannot access the administrator/backend of the website and we have tried to explain why that is the case. As you said, at the beginning of this discussion,
JP59 wrote:
Sun Dec 08, 2019 3:00 pm
I think I made a mistake changing the rights of guest user in ACL.

So, do you know where the ACL information is stored? The answer is that the ACL information is stored (as @Webdongle tried to explain) in the tables, _usergroups and _usergroup_map and your user information—which is stored in the table _users—is tied to this information. Therefore, when you wrote,
JP59 wrote:
Sun Dec 08, 2019 6:37 pm
All is OK in these tables of the DB
... how do you know "all is OK"? ???

We have answered this question before. See, for example, viewtopic.php?f=708&t=935570. There are many other examples if you search for them. 8)
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 37783
Joined: Sat Apr 05, 2008 9:58 pm

Re: Super user back end denied

Post by Webdongle » Sun Dec 08, 2019 7:26 pm

JP59 wrote:
Sun Dec 08, 2019 6:37 pm
All is OK in these tables of the db...
That is an incorrect statement. The correct statement should be
'I checked that the Group ID for your user ID matches the ID for Super User in #__usergroup_map. I do not know enough to know if there is another error in the database.'

Perhaps describe your problem? Not try second guessing what you think is the cause of the problem.
e.g.
Whether or not you can reach the admin login page
If you get an error logging in
If you can login but get a blank page.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

JP59
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Dec 08, 2019 2:42 pm

Re: Super user back end denied

Post by JP59 » Sun Dec 08, 2019 8:49 pm

What I understand in your answer is that there is 3 tables in the db which are use for ACL: __users, __usergroups and usergroups_map.

If I understand correctly the structure of the db, these tables are used to say that there is a super user group and who is affected to that group. But I don't see in these tables what can do a super user and it is what I am looking for because I think I have put somewhere that super users group can't access to the admin side of the site.

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8448
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Super user back end denied

Post by sozzled » Sun Dec 08, 2019 9:11 pm

@JP59: I agree with your summary of the situation. Let me try to explain it simply for you.

It is very easy to change the ACL groups in J!. It is really, really easy to change them and make a complete mess of them; it is really easy to change them, make a mess of them, and find that you cannot login to your website. I have done this myself ... a few times.

It is not so easy to fix these kinds of problems.

In other words, there are parts of J! that are not "easy" to use. The ACL management is one of those parts.

The answer depends on what you know and what you're willing to do to fix the problem. You have a few choices.

The simplest solution is to restore the website from a backup you made before you "made a mistake changing the rights of guest user in ACL"; that's the easiest thing to do and should take you about 10 minutes.

The next-easiest solution is to replace the table _user_usergroup_map (with vanilla-flavoured "version" of it obtained from another J! 3.9.13 website that you have). This may take you anything from 10 minutes to an hour, depending on how knowledgeable you are with SQL databases. It sounds easy but you have to be careful and you have to be patient.

See the following screenshot that shows the contents of a "vanilla-flavoured" J! 3.9.13 _usergroups table.
j3_usergroups.png
This is only part of the solution, but this is where I would start.
You do not have the required permissions to view the files attached to this post.
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8448
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Super user back end denied

Post by sozzled » Sun Dec 08, 2019 9:22 pm

The next part of the solution is to look at the ID of the user who cannot login to the backend. You will find this information in the _users table. Now look at the table _user_usergroups_map.

See the following screenshot for reference.
j3_user_usergroup_map.png
So, what you need to do is to make sure that the ID of your user account is "mapped" to usergroup number 8. Does that make sense to you?

(Explained before in viewtopic.php?f=708&t=935570&p=3431426#p3431426)
You do not have the required permissions to view the files attached to this post.
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 37783
Joined: Sat Apr 05, 2008 9:58 pm

Re: Super user back end denied

Post by Webdongle » Sun Dec 08, 2019 10:16 pm

There is another possibility. Super User Group could have been removed from view access level 'Special'

Before we go any further perhaps describe your problem? Not try second guessing what you think is the cause of the problem.
e.g.
Whether or not you can reach the admin login page
If you get an error logging in
If you can login but get a blank page.


That will help us help you.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 11725
Joined: Thu Feb 15, 2007 5:48 am
Location: Suzhou, China

Re: Super user back end denied

Post by toivo » Sun Dec 08, 2019 11:53 pm

sozzled wrote:The next-easiest solution is to replace the table _user_usergroup_map (with vanilla-flavoured "version" of it obtained from another J! 3.9.13 website that you have).
That would be a mistake because, unless both websites are newly installed, the other website would not have exactly the same combination of user ids and usergroup ids. Even the #__usergroups tables can be different because custom usergroups may have been added to one or both of them.
Toivo Talikka, Global Moderator

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8448
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Super user back end denied

Post by sozzled » Mon Dec 09, 2019 12:52 am

@toivo: Yeah, well ... I wouldn't know, would I? This has happened to me before and that's how I fixed the problem.

@JP59: As I wrote earlier, it's easy to make a complete mess of things (when you don't know what you're doing) and the easiest solution is to restore the website from a backup. If you can't do that, then (a) give the job to someone else, or (b) figure it out for yourself. All I can says "good luck".

(I'm not interested in participating in a panel discussion where people are speculating about what caused the problem to begin with. Furthermore, it's not our job to lecture people about how to describe the problem in ways that other people may understand.)
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

JP59
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Dec 08, 2019 2:42 pm

Re: Super user back end denied

Post by JP59 » Mon Dec 09, 2019 7:57 pm

Hello,

My usergroups and usergroups_map tables are like the pictures you put in the messages. Super user exists and has a 8 code.

here is what I have when I try to connect to the admin page of the site. It's in french.

Image

The english translation is : You can't access to the administration of this site.

In the frontend of the site I can use the super user code to be registered and access some private part of the site.
You do not have the required permissions to view the files attached to this post.

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8448
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Super user back end denied

Post by sozzled » Mon Dec 09, 2019 8:13 pm

Thank you for your reply. The screenshot you show is how I imagine it to be. I understand that your user account is not allowed to access the backend. Yes, this makes sense to me.

It makes sense to me that the advice offered by @Webdongle (offered in good faith) is not applicable to your circumstances.

Let us try to work through this matter methodically. Can you please copy the file configuration.php to your PC and look for the line that says

Code: Select all

	public $dbprefix = 'xxxxx_';
???

Compare the "xxxxx" characters with the tables in your database and find the table named xxxxx_user_usergroup_map.

JP59 wrote:
Mon Dec 09, 2019 7:57 pm
My usergroups and usergroups_map tables are like the pictures you put in the messages.
The correct table name is xxxxx_user_usergroup_map, just to be clear.
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 37783
Joined: Sat Apr 05, 2008 9:58 pm

Re: Super user back end denied

Post by Webdongle » Mon Dec 09, 2019 8:47 pm

OK I just made an experiment

Created a new group and set permissions for 'Super user'
Logged in with user set to new group
Edited user group 'Super user' and denied access for 'Super user' permissions
Result my user in 'Super user' group could not log in admin but could log in front end

Undone the changes but still unable to login admin with my user in 'Super user' group

Looking in database to see why reversing the edit failed to allow my user in 'Super user' group still can't login
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8448
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Super user back end denied

Post by sozzled » Mon Dec 09, 2019 8:58 pm

@Webdongle: in your case (modifying the access for the superuser), yes I can see how the table _viewlevels would apply as this (very old) topic illustrates viewtopic.php?t=704023. This could happen.

As I have remarked before, it takes a few seconds, and a few badly-applied mouse-clicks, to stop things from working ... and it can take much longer to put things back together the way they should be.

However, I'm trying to reconcile the opening statement:
JP59 wrote:
Sun Dec 08, 2019 3:00 pm
I think I made a mistake changing the rights of guest user in ACL ...
... with the current situation. I don't think we have the whole story.
Last edited by sozzled on Mon Dec 09, 2019 9:02 pm, edited 1 time in total.
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 37783
Joined: Sat Apr 05, 2008 9:58 pm

Re: Super user back end denied

Post by Webdongle » Mon Dec 09, 2019 9:02 pm

The screenshot the OP supplied rules out view/access levels
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 8448
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: Super user back end denied

Post by sozzled » Mon Dec 09, 2019 9:05 pm

Agreed, that's what I inferred from reading the OP's original post. 8) We still need to understand which database tables the OP believes they are using, what is in those tables, do we have the correct table prefix, etc. That's why I'm trying to analyse the situation carefully without assuming too much at this time.
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 37783
Joined: Sat Apr 05, 2008 9:58 pm

Re: Super user back end denied

Post by Webdongle » Mon Dec 09, 2019 9:45 pm

OK found it

The assets table gets altered In my test
#__assets ID 1... rules text space was altered from

Code: Select all

"core.admin":{"8":1},
to

Code: Select all

"core.admin":{"12":1},
I had to edit it manually in the database as restoring via Joomla admin (although restoring the user map table) it did not undo the change to the assets table.

Make sure you make a database backup then edit the assets table by replacing the wrong number by an 8. :D
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

JP59
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Dec 08, 2019 2:42 pm

Re: Super user back end denied

Post by JP59 » Fri Dec 27, 2019 10:41 am

Hello,
Sorry, I have not time before to reply to your questions.
In the configuration.php file, the prefix is the same than in the database.
In the table assets, the value of core.admin is {"8":1,"1":0}

JP59
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sun Dec 08, 2019 2:42 pm

Re: Super user back end denied

Post by JP59 » Fri Dec 27, 2019 2:32 pm

I change the value to {"8":1} in the __assets table and now i can access to the admin part of the site.
Thanks for your help.
How must I do to close the discussion and put it as solved ?


Post Reply

Return to “Access Control List (ACL) in Joomla! 3.x”