-1

Why this command ask for username and password despite i use disable-secure-admin?

C:\>asadmin --host localhost --port 4949 disable-secure-admin
Enter admin user name>

My objectif is to execute a command in another domain that have another port number.

Example :

C:\>asadmin --host localhost --port 4949 disable-secure-admin "My-Command"

I read this post i want to do the inverse : Glassfish 3.1.1 - How to enable secure admin for different domains?

Thank you.

Community
  • 1
  • 1
Youcef LAIDANI
  • 55,661
  • 15
  • 90
  • 140

1 Answers1

1

I think you've misunderstood what that command does. It doesn't run commands unsecurely, it turns off secure administration.

If secure admin is enabled, then you will need to supply an admin user and password to turn it off again.

Mike
  • 4,852
  • 1
  • 29
  • 48
  • i see, thank you @Mike for your answer this should help me – Youcef LAIDANI Oct 17 '16 at 06:43
  • sorry but how can i execute my command without asking for username and password, this is my objectif? – Youcef LAIDANI Oct 17 '16 at 07:32
  • For what reason? Is it because you don't know the password or because you want to script it? – Mike Oct 17 '16 at 07:33
  • i have the usename and password, i want to script it – Youcef LAIDANI Oct 17 '16 at 07:34
  • usully i use this way to store my password `asadmin "My-command" --user admin --passwordfile C:\pass-folder\password.txt` but when i changed `asadmin --host localhost --port 4949 "My-command" --user admin --passwordfile C:\pass-folder\password.txt` port it ask for **username** and **password** – Youcef LAIDANI Oct 17 '16 at 07:36
  • [the command always comes **last**](https://docs.oracle.com/cd/E26576_01/doc.312/e24938/asadmin.htm#GSRFM00263) e.g. `asadmin --host localhost --port 4949 --user admin --passwordfile C:\pass-folder\password.txt "My-command"` – Mike Oct 17 '16 at 07:48