Not able to access admin privileges


  • Used Zammad version:
  • Used Zammad installation type: (source, package, docker-compose, …) source
  • Operating system: ubuntu
  • Browser + version:

Expected behavior:

Able to access admin privileges with admin account, if i’m the admin I used to get the settings option.

Actual behavior:

  • I’m not able to access the settings option, suddenly access got revoked none having the admin privileges now.

Steps to reproduce the behavior:

  • Provide me the solution for the same.

Hi Dharshini,

Do you have administrative access to the server (like ssh)?
You should be able to manually add the desired user to the admin group by working on the database layer with rails.

Hello twonnecke,

Yes I do have the admin privileges to login to the server(SSH).
I’m using operating system ubuntu 20.04, Could you please let me know how can do this?


Hi Dharshini,

Please make sure to have a backup ready as we’re working on database layer. I’m not a member of the Zammad service team, just a regular IT admin, so you will be doing changes on your own risk.

Connect to your server using Putty and login as admin.
Access rails console by issuing command and find your user:

admin@ticket:~$ sudo zammad run rails c
[sudo] password for admin:
Loading production environment (Rails 6.1.7)

Find your user by login name (you could use lastname or email address to) and check that this is your user

irb(main):02:0> User.find_by(login: "enter your login name here")
 id: 296,
 organization_id: nil,
 login: "your login name here",
 firstname: "System",
 lastname: "Administrator",
 email: "",

When you’re sure this is your user, issue following commands to add the user to Admin group only

irb(main):003:0> u = User.find_by(login: "enter your login name here")
irb(main):004:0> u.roles = Role.where(name: "Admin")
=> true

You now have administrative access only to Zammad.

Best regards

Here’s the full scope from our documentation:

Above approach will remove all roles configured to the user and might not be what you want.

That’s absolutely true. I thought I made this clear by “You now have administrative access only to Zammad” but I guess this might be read over quickly. Thanks for pointing this out.

1 Like


I’m using postgres db in my zammad how Can I achieve this?

By accessing the rails console:

sudo zammad run rails c

Then you have access to the database entries for zammad and can edit them with the help of the documentation posted by @MrGeneration.

1 Like

Thanks much!! I’m able to resolve the issue.