Storage Software
1748128 Members
3678 Online
108758 Solutions
New Discussion юеВ

"SSSU -a" query

 
SOLVED
Go to solution
yojana
Occasional Advisor

"SSSU -a" query

Hi,

I want to execute "SSSU -a" which adds the user to password file from a script.The problem is that when I use the command "SSSU -a" on command line it prompts me for more inputs as below.

------------
# ./sssu_linux_x86 -a


SSSU for HP StorageWorks Command View EVA
Version: 8.0.0
Build: 111307A

Manager:servername
Username:hpadmin
Password:
------------

If I've to execute this command from the script, how do I specify the rest of the (prompted) parameters like manager, username and password?

If I try to execute following I get an error

---------------------
#./sssu_linux_x86 -a "select manager servername username=hpadmin password=pwd"


SSSU for HP StorageWorks Command View EVA
Version: 8.0.0
Build: 111307A
NoSystemSelected> -a
^
Error: Syntax error at or near here
---------------------

So let me know how we can achieve adding user to password file using SSSU command in scripts.

Appreciate urgent help.

Thanks,
Yojana
11 REPLIES 11
Ivan Ferreira
Honored Contributor

Re: "SSSU -a" query

Create a file called sssu.cmd with all commands that you want to run and then execute:

sssu "file sssu.cmd"
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
yojana
Occasional Advisor

Re: "SSSU -a" query

My question is only limited to single command "SSSU -a" which is an interactive command. How to make it non-interactive?
V├нctor Cesp├│n
Honored Contributor

Re: "SSSU -a" query

As Ivan said, put

SELECT MANAGER IPaddress username=administrator password=administrator

on a commands.txt file and run that text file with SSSU "File commands.txt"
yojana
Occasional Advisor

Re: "SSSU -a" query

I think my question is not clear. The SSSU command with -a option adds management server's user in password file. It is an interactive command which prompts for inputs of management server name, user name and password. Now let me know how I can execute this command in non-interactive mode. If I put "select manager servername username=hpadmin password=pwd"
in test.cmd and execute following I get errors.

./sssu_linux_x86 -a test.cmd


SSSU for HP StorageWorks Command View EVA
Version: 8.0.0
Build: 111307A
NoSystemSelected> -a
^
Error: Syntax error at or near here
NoSystemSelected> test.cmd

What is the way to specify required inputs in non-interactive mode?

Let me know if my question is still not clear.

thanks,
Yojana
Uwe Zessin
Honored Contributor

Re: "SSSU -a" query

Yojana,

the "-a" option is only used for setting up the credentials. Unfortunately, even in CV 9.1 the description in the SSSU manual is a 'inadequate', to say it in a friendly way.

Here is a customer advisory with more details:
http://h20000.www2.hp.com/bizsupport/TechSupport/Document.jsp?lang=en&cc=us&objectID=c01607310

Unfortunately, the 'data entry person' does not understand HTML and there is no quality assurance on the advisories result, so the output is a big mess.
Please check the HTML source of the page - even with all HTML tags it is more useful than the rendered copy, sigh.
.
yojana
Occasional Advisor

Re: "SSSU -a" query

I've gone through SSSU documentation and google searches(including the given link in above post) before posting the question here.

It seems there is no answer available or it is not possible/supported what I'm asking.

Anyways thanks all for their time.
Thomas Callahan
Valued Contributor

Re: "SSSU -a" query

I'll give this a shot to help you understand.

SSSU -a is a run once command. You run it manually, enter your credentials, and it will exit back to the prompt without warning, if successful. From that point on, when scripting against SSSU, you don't need to add password to the scripts.

So.... if testscript.fil contains:

! begin script
select manager somehost.somedomain.com username=admin
select system systemname
ls vdisk
exit
! end script

Then you would simply run:

./sssu_linux_x86 "FILE testscript.fil"

NOTE: there is no -a option when you run the script.

Hopefully that helps.

Thanks,
Tom Callahan
Uwe Zessin
Honored Contributor
Solution

Re: "SSSU -a" query

A misunderstanding, sorry.

Yojana wants to set up the authentication with "-a" _using_ a script.


I don't have the infrastructure right now to try some ideas, but here they are:

- I/O redirection
# cat answers.txt
servername
username
password
# sssu -a < answers.txt

- HERE document
# sssu -a <servername
username
password
EOF
#

- hack something with pseudo ttys and 'expect'
.
Thomas Callahan
Valued Contributor

Re: "SSSU -a" query

- I/O redirection
# cat answers.txt
servername
username
password
# sssu -a < answers.txt

The above works. I was also confused by the question it appears.