1827582 Members
2542 Online
109965 Solutions
New Discussion

sam add user quesiton

 
Rich Wright
Trusted Contributor

sam add user quesiton

sam allows for pre- and post- commands to the add user function.
These commands appear to run in the background.
I would like to run a post-exec script in the foreground to prompt for input.
This should work when using the ASCII interface in addition to X.

Thanks
Rich
4 REPLIES 4
Marco Santerre
Honored Contributor

Re: sam add user quesiton

I don't know exactly what you're looking for, but if it is the place to specify this post-exec script. You have to go into "task Customization" on the Menu where you select "Add" in your Users screen.
Cooperation is doing with a smile what you have to do anyhow.
Rich Wright
Trusted Contributor

Re: sam add user quesiton

Exactly right!
Add user -> Action ->
Task Customization

Then put path to script in
Command to Run After Adding Users : _________________

The problem was I had display & accept commands in the script.
The script gets run in the background and hangs instead of running in the forground so that you can respond to the prompts.
Pete Randall
Outstanding Contributor

Re: sam add user quesiton

Rich,

You're absolutely right - and I don't know of any way around it unless you can figure out where SAM is kicking it off from. If it's a script that SAM is using, then you might be able to modify it to foreground execution.

Pete

Pete
Rich Wright
Trusted Contributor

Re: sam add user quesiton

Thanks for your thoughts.
I guess my only option is to write a script that prompts for all info and calls useradd.
I can then add a "Custom process" to call this script.

Rich