1

I am facing the same problem as mentioned in this question

HTTP Status 500 - Internal Server Error on Glassfish

I do this

root@user1:~# asadmin enable-secure-admin
No command 'asadmin' found, did you mean:
 Command 'amadmin' from package 'amanda-server' (universe)
 Command 'acsadmin' from package 'ion' (universe)
asadmin: command not found

I have a Linux 16.04 and

tried this and i got another email. I appreciate if you can comment on this

glassfish4/bin/asadmin enable-secure-admin
remote failure: At least one admin user has an empty password, which secure admin does not permit. Use the change-admin-password command or the admin console to create non-empty passwords for admin accounts.
Command enable-secure-admin failed. 
Community
  • 1
  • 1
nik
  • 2,500
  • 5
  • 21
  • 48
  • The error is clear: there is at least one admin user with an empty password. You should edit this user's password. A user with an empty password is not a secure user. And generally an administrator with an empty password is a critical issue. – BackSlash Mar 11 '17 at 17:01
  • @BackSlash can you please tell me how to do that ? – nik Mar 11 '17 at 17:02
  • http://stackoverflow.com/questions/8619063/glassfish-3-1-1-how-to-enable-secure-admin-for-different-domains#answer-26253653 – BackSlash Mar 11 '17 at 17:03

1 Answers1

1

Change the password of admin this way:

asadmin --host localhost --port 4848 change-admin-password

It will prompt you with user, type "admin", admin password, retype admin password

Once this is done, enable the security with the following command:

asadmin --host localhost --port 4848 enable-secure-admin

This should fix the problem.

Resource Link: https://stackoverflow.com/a/12323491/2293534

Community
  • 1
  • 1
SkyWalker
  • 28,384
  • 14
  • 74
  • 132
  • glassfish4/bin/asadmin --host localhost --port 4848 change-admin-password Enter admin user name [default: admin]>admin Enter the admin password> Enter the new admin password> Enter the new admin password again> Authentication failed for user: admin (Usually, this means invalid user name and/or password) Command change-admin-password failed. – nik Mar 11 '17 at 17:11
  • I use admin as user and password as password – nik Mar 11 '17 at 17:12
  • 1
    @nik The previous error is telling that the admin user has an empty password, so this means that the first password prompt must be left blank – BackSlash Mar 11 '17 at 17:13
  • `Enter the admin password>` will be blank. Then you will give `Enter the new admin password>` as "password" `Enter the new admin password again>` as "password:" – SkyWalker Mar 11 '17 at 17:16
  • @SkyWalker I did that and I stoped the server and I restart my computer. Now it does not connect at all !!!! nik@mour:~$ glassfish4/bin/asadmin start-domain Waiting for domain1 to start ................................................................................................................................................................................................................................................................................................................................................................................................ – nik Mar 11 '17 at 17:27
  • @SkyWalker sure, I appreciate your help. Now It does not connect I don't know why, if you have time and you can, I can even give you access using teamvierw however, I appreciate your comment to know why it is not working anymore ? – nik Mar 11 '17 at 17:35
  • Run this command now `asadmin --host localhost --port 4848 restart-domain` – SkyWalker Mar 11 '17 at 17:39
  • @SkyWalker should I do it as root? my mean i go to 'sudo -i' or as a user I can do that too? – nik Mar 11 '17 at 17:44
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/137840/discussion-between-skywalker-and-nik). – SkyWalker Mar 11 '17 at 17:45