WRKUSRPRF Command dummied down
335 pts.
0
Q:
WRKUSRPRF Command dummied down
Hi,
We need our IT Helpdesk staff to be able to reset user passwords and enable accounts. What is the easiest way to accomplish this task without giving them access to the other command values? We use NETIQ but it does not work with Vista. If any suggestions come this way, please make sure they are in easy to understand terms :)

Thanks in advance!!
Rick
ASKED: Feb 3 2009  9:36 PM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
1590 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
IN an windows domain enviroment you ca create a custom mmc snap in where you can make a reset password button and the you can set who can manage users
Last Answered: Feb 4 2009  10:01 AM GMT by Fubar   1590 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Gilly400   23625 pts.  |   Feb 4 2009  10:57AM GMT

Hi,

You could make a small CL program and command to achieve this :-

CL Program :-

PGM PARM(&USERPRF &PASSWORD)

CHGUSRPRF USRPRF(&USRPRF) PASSWORD(&PASSWORD) PWDEXP(*YES) STATUS(*ENABLED)

ENDPGM

Command :-

CMD PROMPT(’Reset user profile’)

PARM KWD(USERPRF) TYPE(*CHAR) LEN(10) PROMPT(’User profile’)

PARM KWD(PASSWORD) TYPE(*CHAR) LEN(10) PROMPT(’New Password’)

This should reset the profile and assign a new password - it sets the password as expired which should force the user to change their password when they logon.

Regards,

Martin Gilbert.

 

Rmason   335 pts.  |   Feb 4 2009  1:18PM GMT

Thanks Martin,
Dumb question(s) :)
1) Is the second part of your responce indicating to create a cmd with just the parms needed??

2) Will the CL allow to just re enable the user account without changing a password?

3) In your opinion, what is the best way to deploy this to our IT helpdesk? Menu option??

Thanks…..this site is so helpful!!

 

Rmason   335 pts.  |   Feb 4 2009  2:16PM GMT

Sorry everyone, I did not put in the original question that this is for the Iseries user profiles.

 

Lovemyi   1470 pts.  |   Feb 4 2009  8:42PM GMT

Martin’s example above will do the trick but you will want to compile it with user profile *OWNER instead of the default of *USER as this will then adopt the authority of the person compiling the CL program. This needs to be someone with *SECADM authority like QSECOFR.

Also, you could create 2 CL commands, one for changing the password and enabling the ID like shown above and a second CL to just enable the ID only.

Then put the options on a menu called OPERATIONS or something like that and give the menu authority to your help desk only. A simple GO OPERATIONS will be all they need to type to get to this menu or enhance it by adding a command line and making this their default menu in their profile. Then they will have command line if they need to perform other tasks. If you want them to.

Lovemyi

 

Cwc   3860 pts.  |   Feb 5 2009  12:40AM GMT

Or you could have the same CL program accomplish both possibilities, via a parameter that could be sent in from the command - just add another PARM and KWD line to the command to describe that parameter, and add it as the third parameter within the parantheses to the CL program. Then you could add a condition to test its value and proceed accordingly.

 

Gilly400   23625 pts.  |   Feb 5 2009  11:20AM GMT

Hi,

Answers to your questions :-

1. Yes, tyhe second part is the source to create a command.

2. You could use the following for the program, allows enable without reset of password :-

PGM PARM(&USERPRF &PASSWORD)

IF COND(&PASSWORD *NE ”) THEN( +
CHGUSRPRF USRPRF(&USRPRF) PASSWORD(&PASSWORD) PWDEXP(*YES) STATUS(*ENABLED))

IF COND(&PASSWORD *EQ ”) THEN( +
CHGUSRPRF USRPRF(&USRPRF) PWDEXP(*YES) STATUS(*ENABLED))

ENDPGM

Leave the password blank and the userprofile is just re-enabled, if you fill the password then the password is changed as well.

3. Menu option is nice and easy, if you give the command a nice short and easy name it’s also easy from the command line.

Regards,

Martin Gilbert.

 

Rmason   335 pts.  |   Feb 19 2009  1:55PM GMT

Follow up:2 Parter
Sorry guys…….I have created my menu with the options I need. How do I prompt from a menu option?
Example - If I have an menu option for our helpdesk to start a writer, How can I have thyem select the option and then have the screen promt for the writer that needed to be started?

Second question, I have the program created and tested (Thanks to you guys) to put the option on the same menu to change a user password and/or re enable the users account. Can you please walk me through how to pull it together? In other words, same scenerio…If our helpdesk selects the menu option to re enable a password, how do I invoke the prompt for the userID?

Sorry, I know this is basic.

 

Gilly400   23625 pts.  |   Feb 19 2009  3:55PM GMT

Hi,

Part 1 - Put a question mark in front of the command in the menu :-

? STRPRTWTR

This will prompt the user when they select the option from the menu.

Part 2 - Basically the same answer as part 1. If you called your command RESETUSER, then in your menu you would add the following command to an option :-

? RESETUSER

You can test these yourself directly from a command line, the question mark in front of the command is like pressing F4.

Regards,

Martin Gilbert.

 

Gilly400   23625 pts.  |   Feb 19 2009  4:01PM GMT

Hi,

Another option for your command is to use “selective prompting”. For example if you have 2 parameters in your command like this (assuming your command is called RESETUSER) :-

RESETUSER USERPRF(userprofile) PASSWORD(password)

You can use the following command to prompt for both parameters :-

? RESETUSER

Or you can use the following command to prompt ONLY for the USERPRF :-

RESETUSER ??USERPRF(*N)

Regards,

Martin Gilbert.

 
0