Showing posts with label User Profile n Pass. Show all posts
Showing posts with label User Profile n Pass. Show all posts

Friday, October 12, 2007



Function and Role of User Types

In "USER MAINTENANCE- SU01" --> in the "logon tab" there are 5 different "user type"

1. dialog
2. system
3. communication
4. service
5. reference

Kindly mention the function and role of all the above mentioned user types specifically and hows is one user type different from another.


These are as follows:-


1. Dialogue:-

For this kind of users:-
GUI login is possible.
Initial password and expiration of passowrd are checked.
Multi GUI logins are checked.

Usage:- These are used for GUI logins.


2. System

For this kind of users:-
GUI login is not possible.
Initial password and expiration of passowrd are not checked.

Usage:- These are used for internal use in system like background jobs.

3. Communication

For this kind of users:-
GUI login is not possible.
Users are allowed to change password through some software in middle tier.

Usage:- These are used for login to system through external systems like web application

4. Service


For this kind of users:-
GUI login is possible.
Initial password and expiration of passowrd are not checked.
Multiple logins are allowed.
Users are not allowed to change the password. Only admin can change the password

Usage:- These are used for anonymous users. This type of users should be given minimum
authorization.

5. Reference


For this kind of users:-
GUI login is not ible.
Initial password and expiration of passowrd are not checked.

Usage:- These are special kind of users which are used to give authorization to other users.



Hide the User Menu


Is there a way of masking or hiding the User Menus as we are using SAP Standard Menu instead of User Based Menus?

To put it simple, when the user logs on to the system he should have only the SAP Standard Menu.


You have two ways to control this :


1. Default hide for all the SAP users.

Goto SM30 and edit the table SSM_CUST and set ALL_USER_MENUS_OFF = YES and transport the same in production server.


or


2. Hide based on individual SAP users.

you can also try SM30 and maintain table USERS_SSM for individual users.



What are user groups and how can we use them?

Your auditer asked you to implement user groups in SAP, but you have no idea what are user group.

Transaction SUGR - have a look. Purpose for example is to give certain system admin rights to unlock / change password only to a given user group. You assign user group to an user id via SU01.


User group can be used for different reasons and in different way.


In the latest versions of SAP, actually two types of usergroup exist, the authorization user group and the general user groups.


Naturally the main reason of user groups is to categorize user into a common denominator.


The authorization user group is used in conjunction with S_USER_GROUP authorization object. It allows to create security management authorization by user group. e.g. you can have a local security administrator only able to manage users in his groups, Help-Desk to reset password for all users except users in group SUPER, etc...


The general user group can be used in conjunction with SUIM and SU10, to select all the users in a specific group. User can only be member of one authorization user group but several general user group.


One of the Primary uses of user groups is to sort users into logical groups.


This allows users to be categorised in a method that is not dependent on roles/AG's/Responsibilities/Profiles etc.


User Groups also allow segregation of user maintenance, this is especially useful in a large organisation as you can control who your user admin team can maintain - an example would be giving a team leader the authority to change passwords for users in their team.


The most important factor identified is that the lack of user groups is an indication that there may be problems with the user build process. This is very "fuzzy" but is a bit of a warning flag.


The Auditors job is to provide assurance that SAP is set up and administered in a way that minimises risks to the financial data produced. If the only thing they have picked up on is the lack of usergroups then you will be fine.


If you are in any doubt whatsoever ASK THE AUDITOR. They would have produced a report listing why they feel there is a risk by not having User Groups implemented. If you feel that the risk is mitigated by other measures then let them know. It works best as a 2 way process and both parties can learn something.



How to delete expired roles?


Here are 3 notes you may want to review to see if there is any helpful info, plus some documentation that may be helpful for others....we are going from 40B to 47 and have had a few issues with role deletion

Notes: 312943 504412 & 313587

Additional info

First, the report PFCG_TIME_DEPENDENCY is functioning as designed. It was not designed to remove activity groups.

Second, in transaction SU10 you must have the valid from and valid to fields filled in with the actual dates, 04/08/2002, in order to remove the invalid activity group. You need to be sure that the remove user radio button set in the role tab. But in the profile tab, the add user radio button is selected by default.

What you have to do is go to profile tab and select the remove user radio button. You have to make sure both role and profile has the same radio button selected, i.e. remove from users. Only then when you click save, it will allow you to delete the role from user.


In transaction SU10, you need to complete the following steps:

1. Click on the Authorization data button.

2. Entry the users name, latimerc

3. Click on the execute button.

4. Put a check in front of the users name.

5. Click on the transfer button.

6. Now highlight the user.

7. Click on the pencil button.

8. Click on the Activity Groups tab.

9. Enter the profile name (PM_NOTIFICATION_PROCESSOR).

10. Enter the valid from and valid to dates (04/08/2002).

11. Change the radio buttons to remove user from both the Activity Group and Profile Tabs.

12. Click on the trash can.


In another customer message the following was provided by developement:


We don't have a regular functionality for mass deletion of roles. But if you want to avoid the deletion by hand or with an own created report, I would suggest the following:

The attached note 324962 includes the report ZDELETE_RY_T_AGRS which could delete all roles with names like 'T_....' or 'RY....'. The report gives you a list of all these roles and deletes then the selected ones. You can modify the report to get all your roles in the selection list. Therefore you have to change the following:


SELECT * FROM AGR_FLAGS INTO TABLE L_AGR_FLAGS
WHERE FLAG_TYPE = 'COLL_AGR'
AND FLAG_VALUE = 'X'.
SORT L_AGR_FLAGS BY AGR_NAME.
LOOP AT SINGLE_ACTGROUPS WHERE AGR_NAME+11 <> SPACE AND <<<>
( AGR_NAME(2) = 'T_' OR AGR_NAME(2) = 'RY' ). <<<>
LOOP AT SINGLE_ACTGROUPS WHERE AGR_NAME+11 <> SPACE. <<<>

READ TABLE L_AGR_FLAGS WITH KEY AGR_NAME = SINGLE_ACTGROUPS-AGR_NAME
BINARY SEARCH.


Text from an additional customer message as further help:


- go on role tab

- select remove from user

- enter ZR.PRD.GENERIC and date : 06/04/2002 12/31/9999

- go to profile tab

- select remove from user

- save

- do the same for ZR:HR:ESS from 01/01/2002 to 12/31/9999 and worked
from date for testid was 01/01/2002 and testid2 02/01/2002 and the 2 assignement were deleted And the roles were removed from the 2 UMR.


So it works as designed.



Mass Maintenance of Users Profiles


Goto transaction code SU10

Select your SAP User by Address data or Authorization data.

With the users you want to change selected, click :-

User -> Change -> Profiles

Filled in the Profiles and click save.


How can I create multiple User Id at Random


We usually created Id though SU01, it only one by one.
Can I create multiple user id having same profile at once.

Yes you can, use tcode SCAT. First, make sure your client setting (SCC4) is enabled with ' X eCATT and CATT allowed'. Just in case your Production disabled this.


- Then, you need to create a simulation (test case) of creating new user id by calling tcode
SU01 later.

- Test case must start with Z, example ZCREATE_NEW_USER. Create this case, put title and
choose component as BC (basis components).

- Save and choose Local if you dont want to transport it or choose a dev. class (example ZDEV)
if you want to transport it later.

- Go back and click Change button. Then key -in Object as example SU01, and choose Record
button on top. When it prompts to enter Transaction code, key in SU01 (if for roles,
key-in PFCG) and begin recording. As usual in SU01 create 1 user id, dept field, password,
roles, group and so on.

- Make sure you press Enter on each field because we want to capture the value/object and
SCAT is a bit stupid if you become familiar later....but still useful...indeed.

- You will see a clock on the bottom which means the recording process is on going.
Once done, click Back button and press End button to end the recording.


Note - I noticed you said the profiles are all the same. Then this is much easier...no need to enter the roles/profiles, just duplicate this ID and change the name, dept and password only.


Okay..first stage has finished. Then double click the Object to begin inserting parameters. Then you will see an object for each fields that you run from SU01. Choose the right field example user id (BNAME) and choose button 'Insert Import Parameter (F6)' and you may click Next Screen to 'watch' what have been recorded and proceed to choose several other objects like password field (PASSWORD1, PASSWORD2), roles field (AGR_NAME), group field etc. If you happen to choose the wrong object, then you can reset back (Edit -> Reset Parameterization). You may see so many junk fields captured and this is because SCAT records every steps/dialogs.


Once done, choose Back and save this case. Then you need to click 'Goto -> Variant -> Export' and save it. After that use Ms Excel to open it and begin inserting all other user ids. Save and close. Remember to close this file because SCAT will use it.


Then last one, get back to SCAT and click button execute, processing mode chose Background, choose external file 'the one you created with Excel' and execute. At this moment don't use tcode SU01 bcoz you may interrupt the simulation. Wait for the logs. If you see reds then error was
happening.


Hoping this will help you. I have done (Sap 4.6C) this to create thousands of user ids and also thousands of roles/profiles (pfcg). I heard with Sap 4.7, the SCAT has so many extra features.....


Correct me if i'm wrong elsewhere.....just shared my experience.




Changing the default password for sap* user


You are trying to change the password for sap* user, however when you go into su01 and enter sap* as the user name, the following message is displayed, user sap* does not exist.

You can delete the SAP* user using ABAP code :-
Delete from usr02 where bname = 'SAP*' and mandt = '***';

Where '***' means your client no.

Then login to your client using password SAP* and password PASS

However, if you delete it, then it will automatically created once again with password PASS

The userid, SAP*, is delivered with SAP and is available in clients 000 and 001 after the initial installation. In these 2 clients, the default password is 07061992 (which is, by the way, the initial date when R/3 came into being...). It is given the SAP_ALL user profile and is assigned to the Super user group. When I say it is "delivered" with SAP, I mean that the userid resides in the SAP database; there are actually rows in the user tables used to define userids.

If you delete the userid, SAP*, from the database, SAP has this userid defined in its kernel (the SAP executable code that sits at the operating system level, i.e., disp+work). When this situation exists, the password defined in the SAP code for SAP* is PASS. This is necessary when you are performing client copies for example, as the user information is copied at the end of the process. You can sign into the client you are creating while a client copy is processing using SAP* with password PASS (but you should have a good reason to do this - don't change anything while it's running).

Anyway, if the SAP* userid is missing, you can sign in to the client you want and simply define it using transaction SU01 and, as I stated above, assign it to the SUPER user group and give it the SAP_ALL profile. You define its initial password at this point. If you've forgotten its password and don't have a userid with sufficient authorization to create/change/delete userid,
then you can use the SQL statements to delete it from the database and then you can use SAP* with PASS to sign back into the client you want to define it in and recreate it.

There is also a profile parameter which can override the use of SAP* with PASS to close this security hole in SAP (login/no_automatic_user_sapstar). When this parameter is defined either in your DEFAULT.PFL profile or the instance-specific profile and is set to a value of '1', then the automatic use of SAP* is deactivated. The only way to reactivate the kernel-defined SAP* userid at this point would be to stop SAP, change this parameter to a value of 0 (zero), and then
restart SAP.


The default password for SAP* is 06071992. (DDIC has 19920706)



Different methods to Lock or unlock SAP users


I want to lock all the users in SAP during MTP. I know using SU10 we can do it. Any other alternative ways to lock the users.

Is there a way in SAP to unlock a locked user for a limited time, then automatically after x time set the user back to lock status?

You can fill in "valid from" and "valid until", but you cannot say from Monday to Friday from 8 - 12:00 for part time workers.

Can we schedule to lock all users?

If users get locked, from SU01 you can unlock them.

Use SU10 to mass lock/unlock the users.

Use address data or authorisation data to get a list of users - select the ones you want and

click transfer.

Once this is done click on lock or unlock.

You can also use transaction code EWZ5 to mass lock/unlock the users

or

Execute program EWULKUSR in SE38

or

Set a profile parameter (login/failed_user_auto_unlock) to unlock at midnight the locked users.

or

Here's an ABAP code, short and simple, isn't it?

REPORT zreusrlock.

DATA: time_limit TYPE sy-datum.
DATA: days TYPE i VALUE 40.

time_limit = sy-datum - days.
UPDATE usr02 SET uflag = 64 WHERE trdat <>

If you don't want to specify the time in the program, you can use SE38 to schedule it as a daily background job with the date and time.

or

Probably the easiest way would be to write a sqlplus SQL script that sets all the UFLAG fields in table USR02 to 64 EXCEPT for the BNAMEs you don't want locked. When you are done, you can do the same again but change the UFLAG field to 0.

The SQL statement would look like:

update SAPR3.USR02 set UFLAG = 64 where MANDT = and BNAME !=
AND BNAME != ;

You can replace != with <> if you want. To run this from an OS command line, you would type:

Unix/Oracle 8---> sqlplus internal @
NT/Oracle 8.0---> plus80 internal @
NT/Oracle 8.1---> sqlplus internal @s
Unix/Oracle 9:--> sqlplus /nolog @
NT/Oracle 9-----> sqlplus /nolog @

In UNIX you can cron the script to schedule it. In NT you can schedule it as a task.

or

This is another method to UNLOCK ALL users.

Start Oracle Server manager (I assume you are on Oracle)
connect internal
update sapr3.usr02 set uflag='0' where mandt='399';

When users are locked, the uflag is set to 64.

Finish, just query to check.

select bname, uflag from sapr3.usr02 where mandt='399';

Please note that unlocking users from low level (like Oracle sqlplus) should be used as last resort. Frequent use of low level access may tempt you to use on other things. Highly dangerous and your IS auditors will not be too happy.


Is there a way to set a list of users that cannot be locked, even if we try to lock them manually, and even if they fail connection ( wrong password )?

Increase this parameter in SAP Instance profile:

login/fails_to_user_lock = 6 (max is 99 wrong attempts, i.e, value 99). Currently you have a value of 3.

login/failed_user_auto_unlock (for your midnight unlocking).

Ask users to remember passwords!! If someone is deliberately login-in with different username/password (thereby blocking legitimate access of that user), check hostname from SM21.

This is considered as DoS (Denial of Service).