Problem: Why does the gui show roles, specifically administrator and user, but when I run hammer role list, it shows nothing? When I tried to create those roles with hammer role create --name administrator --description “Role for administrators” it replied: “Could not create the user role: Name has already been taken.” I then was reading in the manual: “Foreman provides you with a set of seeded roles. These roles can be assigned to users but cannot be modified in any way. They serve as a sane set of defaults and a quick starting point. If you wish to base your custom role on one of these, you can clone it and modify the clone.” So I tried to clone the administrator role to a new one, but that did not work.
What am I doing wrong?
Expected outcome: I just connected the satellite to LDAP. I want to assign the LDAP system administrator’s group to the satellite administrator group and assign the LDAP developer’s group to the satellite user group.
# hammer role list
ID | NAME | BUILTIN
11 | Auditor | no
10 | Bookmarks manager | no
1 | Default role | yes
7 | Edit hosts | no
I don’t have any administrator or user role, though. Administrator is only a flag for a user or group, not a role. But maybe, it’s because I have katello…
Creating a role ‘administrator’ if there is already one, it’s obviously pointless trying to create another one. The extract from the manual refers to the locked roles, e.g. the “Auditor” role. It’s locked thus I cannot change it and I have to clone it if I want to make changes.
Either way, as you can see the roles in the gui you should be able to create those groups you want and assign them roles. That should do it. No need to create new roles if you already have them…
This is on a fresh satellite install. I have not created any roles yet. hammer role list show nothing. I want to connect to LDAP and associate some groups with roles, but that is hard to do when I can’t get the role id number.
I thought it might be related to the organization id and or location id. I create a new version of both that I run my servers under. So, I added --location-id 2 --organization-id 1 (location id 2 is default and organization id 1 is default), but it still shows nothing. I simply want to assign a role to an LDAP group so that when someone from that group logs in, his/her role will be pre-defined.