Skip to Content
avatar image
Former Member

Mass USer Lock/Unlock

Hi

Is there a program which can be used to lock/unlock users based on user group or other criteria at specific date & Time?

I want to lock specific number of users on 05/30/2009 at 10:00 am. When I run a program, it should kick out the user if the user is logged in SAP and then block him.

Help is appreciated.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

9 Answers

  • Best Answer
    avatar image
    Former Member
    May 28, 2009 at 04:13 PM

    Don't make this complicated. You can easily do this by SU10 (as much as users you want).

    Regards,

    Dipanjan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 28, 2009 at 08:15 PM

    > ... on 05/30/2009 at 10:00 am.

    You can use network security for this - for example a using SAP router or web dispatcher via which the users have to access the server network.

    Locking the user is not very usefull if they are already logged on.

    Restricting the validity of their roles / accounts might be more effective though...

    Cheers,

    Julius

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 29, 2009 at 05:23 AM

    Hi

    Both the options of user lock is right with the help of Su01 or EWZ5 .

    You can set the validity befor hand as replied by Julius Secondly you can also try to make a program from LSMW not sure just check out once.

    Thx

    Shilpa

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      >

      > Thanks all of you for the response. I decided to create a Z program which will have selection by user ID, user Group, Department etc. We will schedule this job to run at 10:00 am. This program will use FM THUSRINFO to get the list of all users (Only Dialog Users and valid users. Expiry date is blank) who're logged on to the system based on the section on selection screen of program and then will call FM TH_DELETE_USER to log them off and then it will lock these users.

      > This program will then update a Z table with userids, date and time locked.

      > The second part of this program when executed with option Unlock users on selection screen will get userids from the custom table and unlock them.

      >

      > The selction screen will have following selections.

      >

      > Selection

      > UserID

      > User Groups

      > Cost centers

      >

      > CheckBox:

      >

      > Lock

      > UnLock

      in case you have more than one instance on your system (e. g. several application servers) you might want to check to which machine the user is logged on. search for another TH- function module doing that for you (i am not willing to talk about taskhandler functions in a public forum).

      if you are running IDOCs or RFC-processes with other systems, web-applications etc etc make sure you are not logging of any RFC processes/users. also, the posting process might call sub-processes with the same userID - i wouldn't dare to use the task handler function to kill one of those. risky if you are forcing a DEQUEUE_ALL without having the process under control. so you might want to look for another TH function module giving you a clue whether you are dealing with a RFC or an actual GUI-login. kick only the GUI-ones.

  • avatar image
    Former Member
    May 28, 2009 at 03:53 PM

    I am not very sure about specific date and time automatically.

    but for locking users you can use tcode EWZ5

    Add comment
    10|10000 characters needed characters exceeded

  • May 28, 2009 at 04:39 PM

    Hi,

    You must use SU10 to lock multiple users in a simple way.

    Regards,

    Ravi

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 29, 2009 at 07:10 PM

    Use SU10 transaction.

    Regards

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 30, 2009 at 03:23 AM

    HII,

    The users can be locked based on user group can be done by using tcode ewz5

    but locking here works in reverse manner do not select the user which u want to lock

    and click on lock button..........

    Thanks and regards..............

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 18, 2015 at 12:51 PM

    This message was moderated.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 24, 2015 at 08:40 AM

    hi,

    Use This report EWULKUSR lock the mass User in se38

    Add comment
    10|10000 characters needed characters exceeded