01-30-2007 10:35 AM
Dear,
i need your help in how to Reset SAP GUI passwords for number of users one time, as we have non-SAP users, only ESS users that they are currently using Portal ESS, but we need to reset thier GUI passwords so that they will not be accessing the GUI.
we need to do it one shot, one time for more than 600 users.
is there any way?
thank you
01-30-2007 10:39 AM
01-30-2007 10:42 AM
thank you, but in that transaction we cant reset passwords? only locking and unlocking, .. please advice
01-30-2007 10:53 AM
Hi,
1. call su10
2. select all your users
3. mark all
4. pick change button
5. on tab logondata change validity period to 12/31/2006 and mark checkbox
6. pick save button.
Regards
Bernd
01-30-2007 12:16 PM
I assume that you are referring to "disable password logon" for those users (which are not supposed to be able to logon to the ABAP backend directly (using SAPGUI) but should only be able to access the backend via the Portal).
There's two ways:
(1) disable the password on a per-user basis (using SU01)
(2) disable the password (logon ability) for all users (see <a href="https://service.sap.com/sap/support/notes/379081">SAP Note 379081</a>).
Regards, Wolfgang
01-30-2007 1:10 PM
Hi - I normally do this via a SCAT or eSCAT.
Record the process that you want to peform, and then use the 600 names as variables. You can then either give then the same password or a different one.
03-16-2007 2:03 PM
You can also create an ABAP program which can be used to do a mass user password change.
Here are the functions that will do what you need
SUSR_GENERATE_PASSWORD - Generates a Password. Use this function only if you want to do random passwords. Otherwise you can upload your own password.
BAPI_USER_CHANGE - You can use this BAPI to change just the password of a user
Here is an example of some abap code. There may be some syntax errors and possible other issues. I just typed this out and didnt check it. You upload a comma delimited file which is the username,password. If the password field is blank the program will generate its own. Hope this helps
constants: con_comma TYPE c VALUE ','.
data: it_tab TYPE filetable,
gd_subrc TYPE i,
v_filename_string TYPE string,
p_npass like XU400-NEWCODE.
DATA: BEGIN OF itab OCCURS 0,
dLine(40) type c,
END OF itab.
DATA: begin of it_Users occurs 0,
UserID like BAPIBNAME-BAPIBNAME,
Password Like XUBCODE,
end of it_Users.
parameters: p_file like rlgrap-filename default 'c:\users.txt' LOWER CASE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
&----
*& FILE_OPEN_DIALOG METHOD *
&----
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = 'Select File'
default_filename = '*.txt'
multiselection = ' '
CHANGING
file_table = it_tab
rc = gd_subrc.
LOOP AT it_tab INTO p_file.
ENDLOOP.
v_filename_string = p_file.
START-OF-SELECTION.
&----
*& GUI_UPLOAD function *
&----
Upload file to internal table
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = v_filename_string
FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = ITAB
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Loop through internal table and split the comma delimited file
LOOP AT ITAB.
SPLIT ITAB-dLINE AT con_comma INTO it_Users-UserID
it_Users-Password.
APPEND it_Users.
ENDLOOP.
LOOP AT it_Users.
if it_users-Password is initial.
CALL FUNCTION 'SUSR_GENERATE_PASSWORD'
IMPORTING
PASSWORD = p_npass
else.
p_npass = it_users-Password.
endif.
CALL FUNCTION 'BAPI_USER_CHANGE'
EXPORTING
USERNAME = it_users-userid
PASSWORD = p_npass
PASSWORDX = 'X'
TABLES
RETURN = it_ret2.
Loop at it_ret2.
if it_ret2-number = 039.
write: / 'password changed'.
else.
write: / it_ret2-message.
endif.
endloop.
Write: / ''.
refresh it_ret2.
ENDLOOP.