No violations at user/role level

Hi All,
We are using GRC 10.1 SP04
While running the risk analysis reports on user/role level, I don't see any violations. Post running the reports, I can only see that "No rules were selected" under Action field.
Recently we added a few more systems/landscapes so created a few more connector groups and added the corresponding connectors. Strage part is that, for a few D-systems I can see the violations as expected but for the respectice Q-clients I don't see any eventhough there are violations.
Please refer to the attached screen shots for clarity.
Kindly help me with the solutions.
Thanks,
Ameet
P.S: Rule-set is successfully generated and MIME repository is maintained with the appropriate extensions.

Hi Ameet,
How were you able to resolve the issue?
Even I am now stuck with similar issue after I replaced the connector because of change of SRM sys IDs. I followed all the necessary steps after setting up the new connector. Steps like rescheduling all of the background jobs for these new connector. I also regenerated Rules and ran SOD analysis program. But still the nos of Risks differs between past and current report.
Thanks,
Kishore

Similar Messages

  • Management report doesnt show violations at user level.

    Dear all,
    I have a problem that the management report in 5.3 SP04 doesnt show violations at user level. At role level it works fine.
    I've tried full sync and generated a new management report. The problem remains.
    No. of Users Analyzed 859
    Users with no Violations 859 100%
    Users with Violations 0 0%
    Number of Roles Analyzed 2,986
    Roles with no Violations 2,510 84%
    Roles with Violations 476 16%

    Hi Vit,
      Follow both the notes mentioned by Sahad. Check the data in virsa_cc_prmvl table. Run the following script and see if you can see any data:
    select * from virsa_cc_prmvl where genobjtp=1
    If you don't have any data then there was some issue with user analysis so you will have to run the analysis again. If there is data then run the management report again and you should see the data.
    Regards,
    Alpesh

  • Error in Role level SoD violations Dashboard

    Hi All,
    We are running on GRC V10 SP06.
    When role level SoD violations dashboard is opened there is no relation between Number of role analyzed (X) in system and Number of roles with violations(Y).
    In our case Y is far greater than actual X.
    Even the percentage of roles with and without violatons together doesnt constitute 100  % ...
    Please help what may be a solution to fix it.
    -Thanks

    Hi All,
    We are running on GRC V10 SP06.
    When role level SoD violations dashboard is opened there is no relation between Number of role analyzed (X) in system and Number of roles with violations(Y).
    In our case Y is far greater than actual X.
    Even the percentage of roles with and without violatons together doesnt constitute 100  % ...
    Please help what may be a solution to fix it.
    -Thanks

  • Risk Analysis at user level shows nothing in all 3 views though at role level shows risks of global rule set

    I am configuring ARA 10.1 for a ECC 6.0 plug in development system and facing this issue. Risk Analysis at user level shows no data  in all 3 views though at role level shows risks of global rule set. I am using Global rule set. I generated all risks/functions & using connector group as SAP_ECCS_LG not SAP_R3_LG.I activated common, R/3 & ECCS BC sets. Added integration scenario for AUTH. Run all 4 sync jobs multiple times successfully. My system already has decentralised EAM 10.1 implemented & even used in production as BAU. I have checked at both chrome & IE. The misleading thing is that RFC is also working fine & I can see risks in Risk Analysis at role level & risky roles are even assigned to valid users.GRC is at SP4 & accordingly is the ECC 6.0 plug in. Thanks in Advance. Please  consider it urgent.

    Hi,
    Assign ECC connector to SAP_ECCS_LG group.
    Run the programs GRAC_PFCG_AUTHORIZATION_SYNCand GRAC_REPOSITORY_OBJECT_SYNC) in full synch mode(this might take time so better do this in background). Better do it sequentially.Check the logs of the jobs in SLG1 just to ensure everythings fine.
    Run ARA for a specific user and mention the connector for faster output. Ensure this user has the role with risks.Also as explained earlier check the GUID against user id in table GRACUSERROLE and using GRACROLE you can find out the technical name of the role updated in the table. This should be same as the backend role.
    Then run ARA and while doing so please ensure the selection screen doesnt have any unwanted default inputs. If followed correctly , this should be of help.  I am assuming the role analysis yielded correct risks as configured since this would mean that connector have correct actions and basic config is in place.
    Regards,
    Vivek

  • Inconsistency Data between Role Level & User Level Risk Analysis

    Hi,
    When we run Role Level Risk Analysis for a role (Ex: XYZ), there is no SOD conflicts. But when we try to run the user level analysis, this role shows SOD conflicts. I mean, XYZ is assigned with other roles. Combination of other roles access may bring SOD conflict, thats fine, but here the challenge is role XYZ itself has SOD conflicts. The same does not appear when we run Role Level Risk Analysis!!
    How could this happen??
    Thanks,
    Karthik

    Hi Karthik,
    The role might be mitigated at role level.
    In RAR Anayze tool, click -More options to expand the selection options
    Chose "Exclude Mitigated Risks: No"

  • How can I add a user Role member that is from a different domain

    We are currently building out SCOM 2012 R2 to provide monitoring as a service to some of our customers.  As of now we have the RMS on our own department's domain (Domain A) which we have full control of and we have a gateway server that is on the company
    wide domain (Domain B) so that we can monitor other departments devices as the leverage this system.
    Monitoring is working just fine on both domains and we are just working on fine tuning SCOM so that we can roll it out as a service we offer to our customers.  One of the next steps we are working on before rolling it out is giving specific users access
    to view only their own devices, dashboards, and groups.  So I created a Read-Only profile and went to add a user to test it out, but that user is on Domain B and SCOM is unable to resolve this account.  I'm seeing Event ID 26319 with Error Code 1332.
    How can I get SCOM to discover devices on a different domain so that I can give them different permissions for accessing the Operations Console and/or Web Console?  Is this possible?
    Here is the Error I'm seeing.
    Log Name:      Operations Manager
    Source:        OpsMgr SDK Service
    Date:          2/4/2015 1:11:59 PM
    Event ID:      26319
    Task Category: None
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:      xxxxx.xxxx.xxxxxxxx.xxx
    Description:
    An exception was thrown while processing UpsertUserRolesV2 for session ID uuid:f3b4015e-9583-4237-b7a6-406826434553;id=40.
     Exception message: The creator of this fault did not specify a Reason.
     Full Exception: System.ServiceModel.FaultException`1[Microsoft.EnterpriseManagement.Common.UserRoleUserUnresolvedException]: The creator of this fault did not specify a Reason. (Fault Detail is equal to Microsoft.EnterpriseManagement.Common.UserRoleUserUnresolvedException:
    Unable to resolve the user [email protected] associated with the user role. Error code 1332. Check your active directory configuration.).
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="OpsMgr SDK Service" />
        <EventID Qualifiers="49152">26319</EventID>
        <Level>2</Level>
        <Task>0</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2015-02-04T21:11:59.000000000Z" />
        <EventRecordID>172748</EventRecordID>
        <Channel>Operations Manager</Channel>
        <Computer>xxxxx.xxxx.xxxxxxxx.xxx</Computer>
        <Security />
      </System>
      <EventData>
        <Data>UpsertUserRolesV2</Data>
        <Data>uuid:f3b4015e-9583-4237-b7a6-406826434553;id=40</Data>
        <Data>The creator of this fault did not specify a Reason.</Data>
        <Data>System.ServiceModel.FaultException`1[Microsoft.EnterpriseManagement.Common.UserRoleUserUnresolvedException]: The creator of this fault did not specify a Reason. (Fault Detail is equal to Microsoft.EnterpriseManagement.Common.UserRoleUserUnresolvedException:
    Unable to resolve the user [email protected]  associated with the user role. Error code 1332. Check your active directory configuration.).</Data>
      </EventData>
    </Event>
    Thanks for any help I can get in resolving this issue.
    Jake

    The SCOM Management Server is in Domain A.  I've tried it already and it has failed.  
    So just to clarify the method I used was to go to Administration>Security>User Roles.  Then New User Role>Read-Only Operator.  In the Create User Role Wizard I then gave the User Role a name, Clicked "Add" under User Role Members.
     Then the Select Users or Groups window pops up and I changed the Locations from Domain A to Domain B and searched for the user, which it's able to find, then clicked "OK" to add it to the User Role members which it does just fine.  On
    the next page which is Group Scope I checked the one group I want this account to have access to and then click next.  This brings me to Dashboards and Views where I click the radio button for "Only the dashboards and views selected in each tab are
    approved" and chose the folder of dashboards I want this account to access and then click next.  This brings me to the Summary and I click "Create".  At this point it thinks for a moment then closes out the wizard but the new Read-Only
    Operator does not appear.  I then look in Event Viewer and see the Event I pasted above.
    Am I doing something wrong here?  Any guidance on how to get around this issue would be much appreciated.
    Thanks,
    Jake

  • Solution Manager 4.0 Solution Monitoring User -Roles-Profiles for Satellite

    Hi All,
    I have installed Solution Manager 4.0 (OS -Linux ,Database - DB2) .
    Now i need to connect solution manager to the R/3 4.6C
    Satellite Systems (DEV, QAS ,PRD) for Solution Monitoring
    and Service level Reporting .
    I have read the configuration guide , but unable to get clear idea .
    1) what users (alos type of user -Dialog , Service, Communication etc) do i need create in DEV , and Test in QAS  for solution Monitoring  .
    2) what exact roles /profiles need to be assigned to these users in satellite systems .
    3) what users/roles /profiles needs to be done in SOLMAN system
    i have applied all the required plug ins and support packs
    in satellite systems and solman 40 ..
    Please advice  . Your response will be a great help for me .
    Satish

    Hello Satish,
    Just clarify, if u have meant connecting the satellite systems for EWA reports to be precise. Early watch Reports. If its is the case, then repond so that i can putin my inputs which may be helpful for you in this config.
    Rgds,
    Sri

  • ¿How to use user-roles in Ironport WSA (7.6) using ACS 4.1?

    Hello,
    I want to give a client access to a S370 WSA quarantine and I am using an ACS 4.1 for external authentication; that would be used for administrators and for the client access (non-administration access).
    I have created a user-role in the WSA that has access to the quarantine I want, but I need the user to be in the ACS. I created the user in ACS but my question is, what should I configure or change in the ACS in order for the WSA to recognize the user with the specific role I created and not like an administrator role.
    Thanks for your help!
    Sergio

    Hi,
    This can be done by configuring the Radius Class attribute on the ACS and mapping it with the user roles on the WSA.
    "To map RADIUS users to different Web Security appliance user role types, you assign a role type, such
    as Administrator and Operator, to a RADIUS CLASS attribute. Mapping different role types lets you
    specify the authorization level for each RADIUS user."
    Please go to Page 26-12 of the WSA user guide http://www.cisco.com/c/dam/en/us/td/docs/security/wsa/wsa7-5/user_guide/WSA_7-5-0_UserGuide.pdf for more information under the section "Using External Authentication".
    Regards,
    Kush

  • Modify Script to Create User Role on Single Database.

    Hi All,
    Below is the script to create user role on database. Here problem is when I execute this script, it creates user role for all database within an instance and I want it to create user role only on 2 database say TEST1 and TEST2
    Can anyone help me to modify the script? 
    --===================================================================================
    -- Description
    -- Database Type: MSSQL
    -- This script creates a role called 'gdmmonitor' for ALL databases.
    -- It grants some system catalogs to this role to allow Classification and Assessment on the database.
    -- It then adds a user called "sqlguard" to all databases and grants this user gdmmonitor role.
    -- before runnign this script
    --  you MUST CREATE A SQL LOGIN CALLED 'sqlguard'
    --  This sqlguard login doesn't need to be added to any database or given
    --  any privilege.  The script will take care of that.
    --  Note:
    --   If you wish to use a different login name (instead of 'sqlguard') you need to change
    --   the value of the variable '@Guardium_user' in the script below; 
    --   (Look for the string: "set @Guardium_user = 'sqlguard'" and replace the 'sqlguard')
    -- after runnign this script
    -- Nothing to do, the script already creates the db user
    -- User/Password to use
    -- User: sqlguard (or any other name, if changed)
    -- Pass: user defined
    -- Role: gdmmonitor
    --===================================================================================
    PRINT '>>>==================================================================>>>'
    PRINT '>>> Creating role: "gdmmonitor" at the server level.'
    PRINT '>>>==================================================================>>>'
    -- Change to the master database
    USE master
    -- *** If a different login name is desired, define it here. ***
    DECLARE @Guardium_user AS varchar(50)
    set @Guardium_user = 'sqlguard'
    DECLARE @dbName AS varchar(256)
    DECLARE @memberName AS varchar(256)
    DECLARE @dbVer AS nvarchar(128)
    SET     @dbVer = CAST(serverproperty('ProductVersion') AS nvarchar)
    SET     @dbVer = SUBSTRING(@dbVer, 1, CHARINDEX('.', @dbVer) - 1)
    IF (@dbVer = '8') SET @dbVer = '2000'
    ELSE IF (@dbVer = '9')  SET @dbVer = '2005'
    ELSE IF (@dbVer = '10')  SET @dbVer = '2008'
    ELSE IF (@dbVer = '11')  SET @dbVer = '2012'
    ELSE SET @dbVer = '''Unsupported Version'''
    IF (@dbVer != '2000')
    BEGIN
      -- This privilege is required to peform a specific MSSQL test.
      -- Test name: SQL OLEDB disabled (DisallowAdhocAccess registry key) 
      -- Procedure execute: EXEC master.dbo.sp_MSset_oledb_prop 
      -- Purpose: To display provider property, not changing anything.
      PRINT '==> Granting MSSSQL 2005 and above setupadmin server role'
      EXEC master..sp_addsrvrolemember @loginame = @Guardium_user, @rolename = N'setupadmin'
    END
    SELECT  @dbName = DB_NAME()
    PRINT '==> Starting MSSql ' + @dbVer + ' role creation on database: ' + @dbName
    -- find any members of the role if they exist
    CREATE TABLE #rolemember (membername VARCHAR(256) NOT NULL)
    INSERT INTO #rolemember
    SELECT DISTINCT usr.name FROM dbo.sysusers usr, .dbo.sysmembers mbr
    WHERE usr.uid = mbr.memberuid
    AND mbr.groupuid = (SELECT uid FROM .dbo.sysusers WHERE name = 'gdmmonitor')
    --  Drop the Role Members If they exist
    IF EXISTS (SELECT count(*) FROM #rolemember)
    BEGIN
      PRINT '==> Dropping the gdmmonitor role members on: ' + @dbName
      DECLARE DropCursor CURSOR FOR SELECT membername from #rolemember
      OPEN DropCursor
      FETCH DropCursor INTO @memberName
      WHILE @@Fetch_Status = 0
       BEGIN
        PRINT '==> Dropping member: ''' + @memberName + ''''
        exec('EXEC sp_droprolemember ''gdmmonitor'', ''' + @memberName + ''' ;')
        FETCH DropCursor INTO @memberName
       END
      CLOSE DropCursor
      DEALLOCATE DropCursor
    END
    -- drop the role if it exists
    IF EXISTS (SELECT 1 FROM .dbo.sysusers WHERE name = 'gdmmonitor')
    BEGIN
      PRINT '==> Dropping the role gdmmonitor on: ' + @dbName
      exec sp_droprole 'gdmmonitor'
    END
    -- Create the role
    PRINT '==> Creating the role gdmmonitor on: ' + @dbName
    exec sp_addrole 'gdmmonitor'
    -- Grant select privileges to the role for MSSql Common
    PRINT '==> Granting common SELECT privileges on: ' + @dbName
    GRANT SELECT ON dbo.spt_values     TO gdmmonitor
    GRANT SELECT ON dbo.sysmembers     TO gdmmonitor
    GRANT SELECT ON dbo.sysobjects     TO gdmmonitor
    GRANT SELECT ON dbo.sysprotects    TO gdmmonitor
    GRANT SELECT ON dbo.sysusers       TO gdmmonitor
    GRANT SELECT ON dbo.sysconfigures  TO gdmmonitor
    GRANT SELECT ON dbo.sysdatabases   TO gdmmonitor
    GRANT SELECT ON dbo.sysfiles       TO gdmmonitor
    GRANT SELECT ON dbo.syslogins      TO gdmmonitor
    GRANT SELECT ON dbo.syspermissions TO gdmmonitor
    -- Grant execute privileges to the role for MSSql Common
    PRINT '==> Granting common EXECUTE privileges on: ' + @dbName
    GRANT EXECUTE ON sp_helpdbfixedrole    TO gdmmonitor
    GRANT EXECUTE ON sp_helprotect         TO gdmmonitor
    GRANT EXECUTE ON sp_helprolemember     TO gdmmonitor
    GRANT EXECUTE ON sp_helpsrvrolemember  TO gdmmonitor
    GRANT EXECUTE ON sp_tables             TO gdmmonitor
    GRANT EXECUTE ON sp_validatelogins     TO gdmmonitor
    GRANT EXECUTE ON sp_server_info       TO gdmmonitor
    -- Check if the version is 2005 or greater
    IF (@dbVer != '2000')
    BEGIN
      -- Grant select privileges to the role for MSSql 2005 and above
      PRINT '==> Granting MSSql 2005 and above SELECT privileges on: ' + @dbName
      GRANT SELECT ON sys.all_objects           TO gdmmonitor
      GRANT SELECT ON sys.database_permissions  TO gdmmonitor
      GRANT SELECT ON sys.database_principals   TO gdmmonitor
      GRANT SELECT ON sys.sql_logins            TO gdmmonitor
      GRANT SELECT ON sys.sysfiles              TO gdmmonitor
      GRANT SELECT ON sys.database_role_members TO gdmmonitor 
      GRANT SELECT ON sys.server_role_members   TO gdmmonitor 
      GRANT SELECT ON sys.configurations        TO gdmmonitor
      GRANT SELECT ON sys.master_key_passwords  TO gdmmonitor
      GRANT SELECT ON sys.server_principals     TO gdmmonitor
      GRANT SELECT ON sys.server_permissions    TO gdmmonitor
      GRANT SELECT ON sys.credentials    
       TO gdmmonitor
      --This is called by master.dbo.sp_MSset_oledb_prop.  
      --By defautl it should have already been granted to public. 
      GRANT EXECUTE ON sys.xp_instance_regread TO GDMMONITOR
      GRANT EXECUTE ON sys.sp_MSset_oledb_prop TO GDMMONITOR 
    END
    -- Re-add the dropped members
    IF EXISTS (SELECT 1 FROM #rolemember)
    BEGIN
      PRINT '==> Re-adding the role members on: ' + @dbName
      DECLARE DropCursor CURSOR FOR SELECT membername from #rolemember
      OPEN DropCursor
      FETCH DropCursor INTO @memberName
      WHILE @@Fetch_Status = 0
        BEGIN
         PRINT '==> Re-adding member: ''' + @memberName + ''''
         exec('EXEC sp_addrolemember ''gdmmonitor'', ''' + @memberName + ''' ;')
         FETCH DropCursor INTO @memberName
        END
      CLOSE DropCursor
      DEALLOCATE DropCursor
    END
    -- END of role creation on database
    PRINT '==> END of role creation on: ' + @dbName
    PRINT ''
    -- Change to the msdb database
    USE msdb
    set @memberName = ''
    SELECT  @dbName = DB_NAME()
    PRINT '==> Starting MSSql ' + @dbVer + ' role creation on database: ' + @dbName
    -- find any members of the role if it exists
    TRUNCATE TABLE #rolemember
    INSERT INTO #rolemember
    SELECT DISTINCT usr.name FROM .dbo.sysusers usr, .dbo.sysmembers mbr
    WHERE usr.uid = mbr.memberuid
    AND groupuid = (SELECT uid FROM .dbo.sysusers WHERE name = 'gdmmonitor')
    --  Drop the Role Members If they exist
    IF EXISTS (SELECT count(*) FROM #rolemember)
    BEGIN
      PRINT '==> Dropping the gdmmonitor role members on: ' + @dbName
      DECLARE DropCursor CURSOR FOR SELECT membername from #rolemember
      OPEN DropCursor
      FETCH DropCursor INTO @memberName
      WHILE @@Fetch_Status = 0
       BEGIN
        PRINT '==> Dropping member: ''' + @memberName + ''''
        exec('EXEC sp_droprolemember ''gdmmonitor'', ''' + @memberName + ''' ;')
        FETCH DropCursor INTO @memberName
       END
      CLOSE DropCursor
      DEALLOCATE DropCursor
    END
    -- drop the role if it exists
    IF EXISTS (SELECT 1 FROM .dbo.sysusers WHERE name = 'gdmmonitor')
    BEGIN
      PRINT '==> Dropping the gdmmonitor role on: ' + @dbName
      exec sp_droprole 'gdmmonitor'
    END
    -- Create the role
    PRINT '==> Creating the gdmmonitor role on: ' + @dbName
    exec sp_addrole 'gdmmonitor'
    -- Grant select privileges to the role for MSSql Common
    PRINT '==> Granting common SELECT privileges on: ' + @dbName
    GRANT SELECT ON dbo.sysobjects     TO gdmmonitor
    GRANT SELECT ON dbo.sysusers       TO gdmmonitor
    GRANT SELECT ON dbo.sysprotects    TO gdmmonitor
    GRANT SELECT ON dbo.sysmembers     TO gdmmonitor
    GRANT SELECT ON dbo.sysfiles       TO gdmmonitor
    GRANT SELECT ON dbo.syspermissions TO gdmmonitor
    GRANT SELECT ON dbo.backupset   TO gdmmonitor
    -- Check if the version is 2005 or greater
    IF (@dbVer != '2000')
    BEGIN
      -- Grant select privileges to the role for MSSql 2005 and above
      PRINT '==> Granting MSSql 2005 and above SELECT privileges on: ' + @dbName
      GRANT SELECT ON sys.all_objects TO gdmmonitor
      GRANT SELECT ON sys.database_permissions TO gdmmonitor
      GRANT SELECT ON sys.database_principals TO gdmmonitor
      GRANT SELECT ON sys.sysfiles TO gdmmonitor
      -- Grant execute privileges to the role for MSSql 2005 or above
      PRINT '==> Granting MSSql 2005 and above EXECUTE privileges on: ' + @dbName
      GRANT EXECUTE ON msdb.dbo.sp_enum_login_for_proxy TO gdmmonitor
      GRANT SELECT ON sys.database_role_members  TO gdmmonitor
    END
    IF (@dbVer > '2000' and @dbVer < '2012') 
    --This sp is not available in SQL 2012
    BEGIN
      GRANT EXECUTE ON sp_get_dtspackage TO gdmmonitor
    END
    -- Re-add the dropped members
    IF EXISTS (SELECT count(*) FROM #rolemember)
    BEGIN
      PRINT '==> Re-adding the gdmmonitor role members on: ' + @dbName
      DECLARE DropCursor CURSOR FOR SELECT membername from #rolemember
      OPEN DropCursor
      FETCH DropCursor INTO @memberName
      WHILE @@Fetch_Status = 0
        BEGIN
         PRINT '==> Re-adding member: ''' + @memberName + ''''
         exec('EXEC sp_addrolemember ''gdmmonitor'', ''' + @memberName + ''' ;')
         FETCH DropCursor INTO @memberName
        END
      CLOSE DropCursor
      DEALLOCATE DropCursor
    END
    -- drop the temporary table
    DROP TABLE #rolemember
    -- END of role creation on database
    PRINT '==> END of gdmmonitor role creation on: ' + @dbName
    -- Role creation complete
    PRINT '<<<==================================================================<<<'
    PRINT '<<< END of creating role: "gdmmonitor" at the server level.'
    PRINT '<<<==================================================================<<<'
    PRINT ''
    PRINT '>>>==================================================================>>>'
    PRINT '>>> Starting application database role creation'
    PRINT '>>>==================================================================>>>'
    use master
    DECLARE @databaseName AS varchar(80)
    DECLARE @executeString AS varchar(7950)
    DECLARE @dbcounter as int   
    set @dbcounter = 0
    DECLARE DatabaseCursor CURSOR FOR SELECT name from sysdatabases where name not in ('master', 'msdb')
    and not (status & 1024 > 1)
    --read only
    and not (status & 4096 > 1)
    --single user
    and not (status & 512 > 1)
    --offline
    and not (status & 32 > 1)
    --loading
    and not (status & 64 > 1)
    --pre recovery
    and not (status & 128 > 1)
    --recovering
    and not (status & 256 > 1)
    --not recovered
    and not (status & 32768 > 1)
    --emergency mode
    OPEN DatabaseCursor
    FETCH DatabaseCursor INTO @databaseName
    WHILE @@Fetch_Status = 0
    BEGIN
    set @dbcounter = @dbcounter + 1     
    set @databaseName = '"' + @databaseName + '"'  
    set @executeString = ''
    set @executeString = 'use ' + @databaseName + ' ' +
             'PRINT ''>>>==================================================================>>>'' ' +
             'PRINT ''>>> Starting MSSql ' + @dbVer + ' role creation on database: ' + @databaseName + ''' ' +
             'PRINT ''>>>==================================================================>>>'' ' +
           '/* Variable @memberNameDBname must be declare within the string or else it will fail */ ' +
           'DECLARE @memberName' + cast(@dbcounter as varchar(5)) + ' as varchar(50) ' +
           '/*find any members of the role if it exists*/ ' +
             'CREATE TABLE #rolemember (membername VARCHAR(256) NOT NULL) ' +
             'INSERT INTO #rolemember ' +
             'SELECT DISTINCT usr.name FROM dbo.sysusers usr, dbo.sysmembers mbr ' +
             'WHERE usr.uid = mbr.memberuid ' +
             'AND groupuid = (SELECT uid FROM dbo.sysusers WHERE name = ''gdmmonitor'') ' +
             '/*Drop the Role Members If they exist*/ ' +
             'IF EXISTS (SELECT * FROM #rolemember) ' +
             'BEGIN ' +
               'PRINT ''==> Dropping the role members on: ' + @databaseName + ''' ' +
               'DECLARE DropCursor CURSOR FOR SELECT membername from #rolemember ' +
               'OPEN DropCursor ' +
               'FETCH DropCursor INTO @memberName' + cast(@dbcounter as varchar(5)) + ' ' +
               'WHILE @@Fetch_Status = 0 ' +
                 'BEGIN ' +
                 'PRINT ''==> Dropping member: '' + @memberName' + cast(@dbcounter as varchar(5)) + ' ' +
                 'exec(''EXEC sp_droprolemember ''''gdmmonitor'''', '''''' + @memberName' + cast(@dbcounter as varchar(5))  + ' + '''''';'') ' +
                 'FETCH DropCursor INTO @memberName' + cast(@dbcounter as varchar(5)) + ' ' +
                 'END ' +
               'CLOSE DropCursor ' +
               'DEALLOCATE DropCursor ' +
             'END ' +
             '/*drop the role if it exists*/ ' +
             'IF EXISTS (SELECT 1 FROM .dbo.sysusers WHERE name = ''gdmmonitor'') ' +
             'BEGIN ' +
               'PRINT ''==> Dropping the gdmmonitor role on: ' + @databaseName + ''' ' +
               'exec sp_droprole ''gdmmonitor'' ' +
             'END ' +
             '/* Create the role */ ' +
             'PRINT ''==> Creating the gdmmonitor role on: ' + @databaseName + ''' ' +
             'exec sp_addrole ''gdmmonitor'' ' +
             '/* Grant select privileges to the role for MSSql Common */ ' +
             'PRINT ''==> Granting common SELECT privileges on: ' + @databaseName + ''' ' +
             'GRANT SELECT ON dbo.sysmembers     TO gdmmonitor ' +
             'GRANT SELECT ON dbo.sysobjects     TO gdmmonitor ' +
             'GRANT SELECT ON dbo.sysprotects    TO gdmmonitor ' +
             'GRANT SELECT ON dbo.sysusers       TO gdmmonitor ' +
             'GRANT SELECT ON dbo.sysfiles       TO gdmmonitor ' +
                   'GRANT SELECT ON dbo.syspermissions TO gdmmonitor ' +
             '/* Check if the version is 2005 or greater */ ' +
             'IF (' + @dbVer + ' != ''2000'') ' +
             'BEGIN ' +
               '/* Grant select privileges to the role for MSSql 2005 and above */ ' +
               'PRINT ''==> Granting MSSql 2005 and above SELECT privileges on: ' + @databaseName + ''' ' +
               'GRANT SELECT ON sys.database_permissions TO gdmmonitor ' +
               'GRANT SELECT ON sys.all_objects          TO gdmmonitor ' +
               'GRANT SELECT ON sys.database_principals  TO gdmmonitor ' +
               'GRANT SELECT ON sys.sysfiles      TO gdmmonitor ' +          
               'GRANT SELECT ON sys.database_role_members  TO gdmmonitor ' +           
             'END ' +
             '/* Re-add the dropped members */ ' +
             'IF EXISTS (SELECT 1 FROM #rolemember) ' +
             'BEGIN ' +
               'PRINT ''==> Re-adding the gdmmonitor role members on: ' + @databaseName + ''' ' +
               'DECLARE DropCursor CURSOR FOR SELECT membername from #rolemember ' +
               'OPEN DropCursor ' +
               'FETCH DropCursor INTO @memberName' + cast(@dbcounter as varchar(5)) + ' ' +
               'WHILE @@Fetch_Status = 0 ' +
                 'BEGIN ' +
                   'PRINT ''==> Re-adding member: '' + @memberName' + cast(@dbcounter as varchar(5)) + ' ' +
                   'exec(''EXEC sp_addrolemember ''''gdmmonitor'''', '''''' + @memberName' + cast(@dbcounter as varchar(5))  + ' + '''''';'') ' +
                   'FETCH DropCursor INTO @memberName' + cast(@dbcounter as varchar(5)) + ' ' +
                 'END ' +
               'CLOSE DropCursor ' +
               'DEALLOCATE DropCursor ' +
             'END ' +
             '/* drop the temporary table */ ' +
             'DROP TABLE #rolemember ' +
             'PRINT ''<<<==================================================================<<<'' ' +
             'PRINT ''<<< END of role creation on: ' + @databaseName + ''' ' +
             'PRINT ''<<<==================================================================<<<'' ' +
             'PRINT '' ''' +
             'PRINT '' '''
    execute (@executeString)
    FETCH DatabaseCursor INTO @databaseName
    END
    CLOSE DatabaseCursor
    DEALLOCATE DatabaseCursor
    --  Adding user to all the databases
    --  and grant gdmmonitor role, only if login exists.
    PRINT '>>>==================================================================>>>'
    PRINT '>>> Add and Grant gdmmonitor role to: ''' + @Guardium_user + ''''
    PRINT '>>> on all databases.'
    PRINT '>>>==================================================================>>>'
    USE master
    /* Check if @Guardium_user is a login exist, if not do nothing.*/
    IF NOT EXISTS (select * from syslogins where name = @Guardium_user)
    BEGIN
      PRINT ''
      PRINT '************************************************************************'
      PRINT '*** ERROR: Could not find the login: ''' + @Guardium_user + ''''
      PRINT '***        Please add the login and re-run this script.'
      PRINT '************************************************************************'
      PRINT ''
    END
    ELSE
    BEGIN
      DECLARE @counter AS smallint
      set @counter = 0
      --  This loop runs 4 time just to make sure that the @Guardium_user gets added to all db.
      --  99% of the time, this is totally unnecessary.  But in some rare case on SQL 2005
      --  the loop skips some databases when it tried to add the @Guardium_user.
      --  After two to three executions, the user is added in all the dbs.
      --  Might be a SQL Server bug.
      WHILE @counter <= 3
      BEGIN
      set @counter = @counter + 1
        set @databaseName = ''
        set @executeString = ''
        DECLARE DatabaseCursor CURSOR FOR SELECT name from sysdatabases
        where not (status & 1024 > 1)
    --read only
        and not (status & 4096 > 1)
    --single user
        and not (status & 512 > 1)
    --offline
        and not (status & 32 > 1)
    --loading
        and not (status & 64 > 1)
    --pre recovery
        and not (status & 128 > 1)
    --recovering
        and not (status & 256 > 1)
    --not recovered
    and not (status & 32768 > 1)
    --emergency mode    
        OPEN DatabaseCursor
        FETCH DatabaseCursor INTO @databaseName
        WHILE @@Fetch_Status = 0
        BEGIN
        set @databaseName = '"' + @databaseName + '"' 
        set @executeString = ''
        set @executeString = 'use ' + @databaseName + ' ' +
                 '/*Check if the login already has access to this database */ ' +
                 'IF EXISTS (select * from sysusers where name = ''' + @Guardium_user + ''' and islogin = 1) ' +
                 'BEGIN ' +
                  '/*Check if login already have gdmmonitor role*/ ' +
                  'IF NOT EXISTS (SELECT usr.name FROM dbo.sysusers usr, dbo.sysmembers mbr WHERE usr.uid = mbr.memberuid ' +
                'AND mbr.groupuid = (SELECT uid FROM dbo.sysusers WHERE name = ''gdmmonitor'') ' +
                'AND usr.name = ''' + @Guardium_user + ''') ' +
                  'BEGIN ' +
                  'PRINT ''==> Granting gdmmonitor role to ' + @Guardium_user + ' on database ' + @databaseName + ''' ' +
                  'execute sp_addrolemember ''gdmmonitor''' + ', [' + @Guardium_user + '] ' +
                  'PRINT '' ''' +
                  'END ' +
                 'END ' +
                 'IF NOT EXISTS (select * from sysusers where name = ''' + @Guardium_user + ''' and islogin = 1) ' +
                 'BEGIN ' +
                 'PRINT ''==> Adding user [' + @Guardium_user + '] to database: ' + @databaseName + ''' ' +
                 'execute sp_adduser [' + @Guardium_user + '] ' +
                 'PRINT ''==> Granting gdmmonitor role to ' + @Guardium_user + ' on database '  + @databaseName + ''' ' +
                 'execute sp_addrolemember ''gdmmonitor''' + ', [' + @Guardium_user + '] ' +
                 'PRINT '' ''' +
                 'END '
        execute (@executeString)
        FETCH DatabaseCursor INTO @databaseName
        END
        CLOSE DatabaseCursor
        DEALLOCATE DatabaseCursor
      END   -- end while
      -- Required for Version 2005 or greater.
      IF (@dbVer != '2000')
      BEGIN
        -- Grant system privileges to the @guardium_user.  This is a requirement for >= SQL 2005
        -- or else some system catalogs will filter our result from assessment test.
        -- This will show up in sys.server_permissions view.
        PRINT '==> Granting catalog privileges to: ''' + @Guardium_user + ''''
        execute ('grant VIEW ANY DATABASE to [' + @Guardium_user + ']' )
        execute ('grant VIEW ANY DEFINITION to [' + @Guardium_user + ']' )
      END
      PRINT '<<<==================================================================<<<'
      PRINT '<<< Finished Adding and Granting gdmmonitor role to: ''' + @Guardium_user + ''''
      PRINT '<<< on all databases.'
      PRINT '<<<==================================================================<<<'
      PRINT ''
    END
    GO

    Thanks a lot Sir... it worked.
    Can you also help me in troubleshooting below issue?
    This script is working fine on all databases except one MS SQL 2005 database. build of this database is 9.00.3042.00
    SA account with highest privileges is been used for script execution. errors received are as follow:
    >>>==================================================================>>>
    >>> Creating role: "gdmmonitor" at the server level.
    >>>==================================================================>>>
    ==> Granting MSSSQL 2005 and above setupadmin server role
    ==> Starting MSSql 2005 role creation on database: master
    (0 row(s) affected)
    ==> Dropping the gdmmonitor role members on: master
    ==> Creating the role gdmmonitor on: master
    Msg 15002, Level 16, State 1, Procedure sp_addrole, Line 16
    The procedure 'sys.sp_addrole' cannot be executed within a transaction.
    ==> Granting common SELECT privileges on: master
    Msg 15151, Level 16, State 1, Line 117
    Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
    Msg 15151, Level 16, State 1, Line 118
    Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
    Msg 15151, Level 16, State 1, Line 119
    Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
    Msg 15151, Level 16, State 1, Line 120
    Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
    Msg 15151, Level 16, State 1, Line 121
    Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
    Msg 15151, Level 16, State 1, Line 122
    Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
    Msg 15151, Level 16, State 1, Line 123
    Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
    Msg 15151, Level 16, State 1, Line 124
    Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
    Msg 15151, Level 16, State 1, Line 125
    Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
    Msg 15151, Level 16, State 1, Line 126
    Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
    ==> Granting common EXECUTE privileges on: master
    Msg 15151, Level 16, State 1, Line 130
    Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
    Msg 15151, Level 16, State 1, Line 131
    Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
    Msg 15151, Level 16, State 1, Line 132
    Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
    Msg 15151, Level 16, State 1, Line 133
    Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
    Msg 15151, Level 16, State 1, Line 134
    Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
    Msg 15151, Level 16, State 1, Line 135
    Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.
    Msg 15151, Level 16, State 1, Line 136
    Cannot find the user 'gdmmonitor', because it does not exist or you do not have permission.

  • Can PID (Parameter ID) be set as a default by TCODE or Role Level

    Hi, Any one has any idea if PID (Parameter ID) and its value can be set as a default at TCODE or at Role Level?
    Thanks in advance.
    Syd.
    Addendum:
    Re: Can PID (Parameter ID) be set as a default by TCODE or Role Level
    Posted: Oct 17, 2006 9:38 AM        Reply      E-mail this post 
    Thanks for the reply, you have mentioned try creating a Transaction variant or a Transaction parameter.
    Here is my question?
    1. Can we set a default Parameter ID at TCODE level so, if any user execute a transaction who has access to execute it, he will have Parameter id and its value as a default?
    2. Can PID be set as a default for SAP TCODE or Custom TCODE, or can be done for both, if it can be done then, How?
    3. Can PID be set as a default for a particular Role or profile?
    Message was edited by: Syed Alam
    Message was edited by: Syed Alam

    Hi JC,
    Yes, I agree.
    A small disclaimer however is that we dont know which transaction is being refered to.
    Creating a transaction variant with the parameter set for it could enable the use to navigate further and back again and in doing so "shed" the screen which the transaction (initially with variant parameter and skip screen) originally gave them.
    Using a user-exit to set the parameter can in some cases be closer to the functionality (irrespective of how the user gets there) and be more reliable. But in this case an adventurous user will be likely to trick it anyway if they want to.
    If the decision is made to use PIDs in the coding, then it is a decision that the user can influence the value (in my view). If coding makes insecure use of PIDs, then it is a design error in the coding.
    Cheers,
    Julius

  • User Role problems in Sun Java Application Server Platform Edition 8

    I am having two problems setting up user roles in Sun Java Application Server Platform Edition 8. At first, I thought that it was a problem with the higher level features that I was using, so I created a very simple example using the simplest authentication I can use, but the problem still occurs. I am using the file realm and configuring the users in the App Server Admin Console. I create 2 users in different roles. One user should have access, the other should not.
    1) The first problem is that both users can access the page
    2) The second problem is that the isUserInRole() method returns false for both users with the role that it should be authenticating against.
    Here is a sample of my code:
    Users Configured in Console:
    username password roles
    user1 ********** admin
    user2 ********** noaccess
    web.xml
         <security-role>
              <role-name>admin</role-name>
         </security-role>
         <security-constraint>
              <web-resource-collection>
                   <web-resource-name>My Protected Area</web-resource-name>
                   <url-pattern>/*</url-pattern>
              </web-resource-collection>
              <auth-constraint>
                   <role-name>admin</role-name>
              </auth-constraint>
              <user-data-constraint>
                   <transport-guarantee>NONE</transport-guarantee>
              </user-data-constraint>
         </security-constraint>
         <login-config>
              <auth-method>BASIC</auth-method>
              <realm-name>file</realm-name>
         </login-config>
         <servlet>
              <servlet-name>
                   TestServlet
              </servlet-name>
              <servlet-class>
                   mypackage.TestServlet
              </servlet-class>
              <security-role-ref>
                   <role-name>admin</role-name>
                   <role-link>admin</role-link>
              </security-role-ref>
         </servlet>
         <servlet-mapping>
              <servlet-name>
                   TestServlet
              </servlet-name>
              <url-pattern>
                   /TestServlet
              </url-pattern>
         </servlet-mapping>
    TestServlet.java:
              out.println("admin role: " + request.isUserInRole("admin") + "<BR/>");
    Thanks before hand for any responses.
    - Brian

    Hi Jeanfrancois,
    Your suggestion has lead me to find my problem. There were actually three problems.
    1) First, you suggestion to reorder my xml file did not cause any errors to occur. I got suspicious that my web.xml file was wrong. I looked at some sample web-xml files and found that I was missing the header as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC '-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN' 'http://java.sun.com/dtd/web-app_2_3.dtd'>
    2) When I added this information, the deploy feature failed stating the my web.xml file was out of order. I fixed the ordering. It now deployed, but the security still wasn't working.
    3) I then added the sun-web.xml file. This file was missing before hand as I thought it was unnessary. However, this file added the essential mapping from a role to a group. After adding this, it now started to work.
    Thanks so much for you time and effort. You really did help me.
    - Brian Blank

  • Limit user role to edit just specific web sites

    Hi,
    can I limit a user role in a way, that this user can edit only chosen web sites and not all? And can I even let user only edit certain region on specific sites?
    Like editing content but not headings?
    UPDATE: I found that this can be done by using content holders? By giving the client only access to specific content holders, and inserting those at certain positions on a site limits the possibilties of editing.
    Regards, Citzwerth

    Not to that level no. You can assign approcal roles to things so they wont render live till approved like on pages but this can not be set to specifics in the way you are looking at.

  • Setting session attributes at the Role level

    I am running AM7.1 in Legacy mode and I am trying to create a role and assign session attributes at this role level. I followed the instructions for doing this but it does not seem to be working. I created the role and added the session service to it. I then went in an changed the attributes (Max Idle, Max Session, etc.) to the values I need for the role. I then assigned the role to a user. However when I log in as this user and look at the Active Sessions panel all of the values are still saying they are set at the defaults. It is not picking up the new values for the user. Am I missing something? Help! -Jeff

    Reply i was also getting this problem in relam mode but 7.0..........but when i specify in the url?role=rolename..........i see the session info applied but i wanted it to be dyanmically applied(without specifiying the role in the url).......i have raised an SR but that is for 7.0 .........please do it for 7.1 i think you might get some response.

  • UWL Universal Worklist use User Role Negate Filter

    Hi, SDN Expert.
    In my UWL configuration, I am trying to exclude to display my task items to one user role.
    I know that the "User Role" parameter can help me to restricts/allows who can get work items via the user role. I can also have multiple user roles separated by semi-colon to cover all the roles to receive the task.
    BUT in my case, I only want few roles NOT to receive the task items, and all other roles to receive them.
    My question is can I use the "NEGATE SIGN" , "!" (means Not Equal To) to exclude the particular user role to receive the task item, says I want to exclude the role name: "mydemorole", I just enter this "!mydemorole" in the "Use Role" parameter of the UWL configuration.
    If NOT, what is the right way I should use to achieve this purpose?
    Thanks for advise,
    KC

    Michael, you can do this in the UWL but only with a 6.40 backend (ex. ECC 5) with a specific patch level (can not remember that patch level).
    Before this you need to set these substituion in the R/3 inbox.
    This being said it is only for workflow task routing. If I read your message correctly you want a manager to assign his authorizations (roles in R/3 or the portal) to a secretary. This is not supported in any standard SAP (or portal) scenario as far as I am aware.
    Cheers,
    D.

  • User roles and role mapping

    I've just start as an intern in Change Management team that is helping to implement SD. My two tasks are to "develop SAP user roles specific to the new business processes" and "manage the role to position mapping for provision of security roles." None of the real employees in my team has ever done this, and my manager is now on three weeks leave. I'm new to SAP and I don't really know where to start. Can anyone offer any advice, or point me to some references? Thanks.

    Intern,
    Its a pretty cold manager who will dump a task on a inexperienced subordinate without any guidance or mentoring,  and then take three weeks off.
    Anyhow, you first need to get some insights as to what the expectations of the client are:  What type of users will there be?  What tasks will each user be responsible for carrying out?
    You also will want to collect a list of names of the actual users. Your Basis people will tell you which bits of data will have to be collected in order to create users on the system
    Next, you need to talk to the SD expert on your team about the solutions that will be implemented.  Quotes? Consignment? Scheduling agreements? Pricing? Customer Service? Marketing?  Customer Master? Material Master? The SD expert should be able to tell you at a very minimum which transactions should be made available.
    There are standard roles available delivered in the system.  These are pretty much un-usable as delivered, but they make a good starting point.  Review http://help.sap.com/erp2005_ehp_04/helpdata/EN/b4/3f9c41919eae5fe10000000a1550b0/frameset.htm
    and
    http://help.sap.com/erp2005_ehp_04/helpdata/EN/06/57683801b5c412e10000009b38f842/frameset.htm
    Once you have all the info needed from the client and your SD experts, you then design the supporting roles at a high level. I usually use an Excel Spreadsheet with two tabs:  One tab listing roles to be developed, with all the transactions and authorization object limitations for each one;  and another tab listing Users and the supporting data needed to create a user.  If you are a Basis expert, you already know the next steps.  If not, then you typically hand your designs to the Basis team for creation of the actual Roles.
    Good luck.  Remember not to treat your interns the same way you have been treated.
    DB49

Maybe you are looking for