Here's the deal... I want to have complete access to the site including the technical stuff, so I'm the admin. I want my client to have access everything except the technical stuff so I want to make him sort of a junior admin. I then want to have my client 'junior admin' to have the ability to add or remove users on his own. I can enable 'administer users' which lets him do this, but then he can also edit administrators such as myself as well which isn't acceptable.

Is there a module or way that would enable me to create these junior admin that could play with users, just not admin users?

Comments

hamedf’s picture

I had the same issue. I solved it by modifying some modules, like user.module. You can add extra categories to your user_perm() hook and then in user_menu() hook you can change access level of some of the items.
If you want to prevent one thing only, like preventing junior admins to edit superuser, you can also do that in user_user() hook. In this function, the glocal $user object is the current logged in user, and there is also another parameter (which I don't remember now) that is the id of the user being edited. You can check and see if the current logged in user's role is not "administrator" and the editing user id IS superuser, then send and "access denied" message" and return without continuing.

webdog24’s picture

I am trying to do the same thing. Surely there must be some module that lets you "protect" the main admin account from being modified by another user who has the "Administer users" control enabled? Has anyone found anything? Ideally, I'd like to be able to hide the main admin account completely from all users.

Tmanagement’s picture

And another with the same question.

I tried some things and it seems even possible to delete a superuser???

I had to specify a username during install. After a succesful install I added another group in order to see if it is possible to grant a user of that group almost everything except the generall site settings. The user of that group should therefore be able to add new users, set their permission (withing its own boundries) and of course delete users when necessary.

the problem is, that this user is even able to delete the first account created or change its persmissions. At first sight this seems a bit odd so I am wondering as well, are we missing something here?

anthonylicari’s picture

Because it has happened to me. A client with admin privledges changed my password. I want to see also how you achieve this.

webdog24’s picture

I found a module that does what we're looking for:
http://drupal.org/project/userprotect

The only thing it doesn't do, which I'd like, is to actually hide the admin account from the user list page. Hope someone can figure out how to do that.

Tmanagement’s picture

I just start using this module and it works!

May I ask why you would like to hide the admin account? For people that know you, in case of a webcommunity that you run with friends, it does not seem to me as a problem since they know who you are and what your rights are. In case of being a company that sells Drupal services you can name your admin account accordingly to your business which will help recognition by the users. Seems a good deal to me as well.

Apart from that, I can not help you with making the admin account invisible.

webdog24’s picture

Well, I am probably being a little to paranoid about having my admin account visible. But I think it's something that I still might want the option of doing. I see it as sort of a security issue. I know that someone needs the password to access the superuser/admin account, but if they can't see the name of the account, then that's one less bit of info they have.