I forgot the Glassfish3 master-password, how can i reset it? - glassfish

I forgot the master-password of my Glassfish 3.1.2.2. Is there a way to reset it? I spent a lot of time "googling around" but i didn't find a suitable answer.

There is a backup password that can be used to access the administrator panel even if you've forgotten the main one.
If you navigate to glassfish\domains\domain1\config\ you will find a file called local-password.
The contents of that file can be used as a password to log in to the control panel as admin.

Please follow the below steps:
Stop the domain
Back up the master password file
Create a new domain and save the master password:
asadmin create-domain --savemasterpassword domain2
Remember the password :-)
Copy the newly created masterpassword file over the old one
Delete the newly created domain:
asadmin delete-domain domain2
FYI, now you should also know why you want to protect the master password file using file permissions :-)

Copy the admin-keyfile from origin install zip (empty password).

This was a big problem for me after inheriting a testing VM from a colleague who left the company. I didn't want to risk creating a new domain as described above and I tried using the contents of local-password file as also described above, but that didn't work for me.
What did work first time was the following on GlassFish Server Open Source Edition 3.1.2.2 (build 5). Change contents of this file:
$GLASSFISH_HOME$\glassfish\domains\domain1\config\admin-keyfile
with:
admin;{SSHA}WQVj8i9CLECCiv+w6ZxGgMrcfPqHPoXZW+2Jdw==;asadmin
I didn't add a newline or carriage return at the end of the line.
This is my modification of an online solution.

For Glassfish 4, after creating domain2 with default passwords, I also had to copy keystore.jks and domain-passwords files along with the master-password before change-master-password would recognise the password.

Related

Confusion resetting Lucee admin password

I have forgotten the server password for my Lucee installation. There are instructions on stack overflow here: Reset Lucee Server admin password. It involves removing two lines from the Lucee server context configuration file and restarting Lucee.
I already have two datasources and I don't want to lose them. If I remove these two lines from the config file, and restart Lucee I presume that somewhere I have to reset the server password.
How do you do that?
Will that invalidate my current datasources?
And if so can I re-estabish them using the new password?
After editing the lucee-server.xml file and restarting Lucee
simply go to the server admin login page where you will be prompted
to set a new password.
No, your datasources and other settings won't have been affected.
Although this should work fine, I would make a copy of the lucee-server.xml file before you edit it just in case.

Lynx file "/etc/lynx.lss" is not available

using cpanel server, setting a simple "lynx http://www.domain.com/script.php" command gives following error and I am unable to understand it.
Lynx file "/etc/lynx.lss" is not available.
the problem is the SHELL.
You can solve this problem via two ways:
1] I simply changed the sentence:
SHELL="/usr/local/cpanel/bin/jailshell"
in /var/spool/cron/account
to SHELL="/bin/bash"
2] You can copy file /etc/lynx.lss
to directory: /home/virtfs/account/etc
Both worked for me !
Wilhelm
You can create an empty (or not) style sheet file in a directory where you have write access, then explicitly point to that file on the lynx command-line:
lynx -lss=/path/to/my/lynx.lss ...
I enabled shell access for the account and it started working. The above answer seems to assume you have access to the entire server and can modify those files, if so then just enable shell access and you are set, but if you are on a shared hosting account basic cpanel and ftp access you may not be able to do it. Ask you hosting company if you can have shell access. Then decide what you can do depending on the answer they give you.
you can solve this issue by follow below process :-
Open this file
root#server [~]# vi /var/cpanel/exim.conf.deps
and append below entries and save it.
/etc/lynx.lss

How to use "htaccess" on synology system for website access control?

I am trying to set up the access control for my personal website on synology NAS. Right now I am using DS212J. I found the following article teaching how to use "htaccess" on apache to achieve that.
http://www.synology.com/support/faq_show.php?lang=enu&q_id=347
But I encountered 2 problem:
1) I don't have the command "htpasswd" after ssh to my DS212J.
2) After I manually create those files, I got the username and password prompting up on the website. However, the password in "admin.pw" and "normal.pw" doesn't work when I type in. I am not sure whether it is because I didn't use command "htpasswd".
What am I missing here?
Thanks.
The htpasswd executable is at /usr/syno/apache/bin/htpasswd. As that directory is not on the PATH, you have to explicitly use the whole path to use it:
Apache doesn't keep passwords in plain text, it uses a hash of them so that even if someone gets access to the password file they won't be able to log in. That's why you must use htpasswd to create the file.
For anyone who comes across this, I couldn't get that synology support tutorial to work either. I am running DSM 5.1-5022 Update 4 on my own domain with ssl. Here's how it got it working:
Follow the steps in the following wiki: Synology Wiki
In the control panel, go to "Web Services" and disable SPDY for secure connections. (Gleaned from this article.)
Good luck.

cpanel change ownership of files

I'm in a totally new situation.
I have the access on root on a reseller account.
One of the clients for that reseller has a file, he can't modify. Is a file installed with a plugin in wordpress.
That much I understood. He is not the owner of the file. I have to change the owner of that file.
I have shell acces and cron acces but I was not able to use it to solve the problem.
The solution I come out till now, that doesn't work is adding a new cron job(copy and paste from a forum)
#!/bin/bash cd /var/cpanel/users for user in * do chown -R $user.$user /home/$user/public_html/* done
Doesn't work! First of all there is only one line in the cron filed for code so the code above it goes in one line and it looks like is commented. Second, I have no ideea if the cron works. I put my email address to be notified when a cron job is being executed, and I don't get any email.
The only thing I care is to change the ownership of a file.
(Answered by the OP in a question edit. Converted to a community Wiki Answer. See Question with no answers, but issue solved in the comments (or extended in chat) )
The OP wrote:
Solved!
I used http://winscp.net/eng/index.php
Steps:
WinSCP Login/Session Use you data for Hostname, User name and Password
At File Protocol choose SCP
Login/ Click Yes for the key
Go up a directory by clicking ..
Go to Home and there navigate to your files
right click on file and on properties you will find the owner of the
file and there you can change it

How to set username and password in JBoss

Unfortunately their Wiki is down for maintenance and the web is not being helpful.
How do I add a new user to JBoss so I can login.
In Tomcat you change the tomcat-users.xml file. There seems to be a similarly located and titled file called login-config.xml in the config folder of jboss.
Is it something to do with this file or something else altogether.
It's in the users.properties file within jboss\server\default\conf\props
Like #Ankur said you need to configure the files in the jboss\server\default\conf\props
I think you want to configure your admin console users. So you have to add one line with your user name and password to the jmx-console-users.properties file (e.g: username=password => jbatista=portuguese).
It's important that you don't forget to add the role to the user created above/privileges. Like tomcat or any other Application server the users have one or more roles and the roles have permissions. In this case we want that the user jbatista has the JBossAdmin role so that he could deploy WARs, etc. Like the add user case, we have to add another entry line. But instead of jmx-console-users.properties we'll add the jbatista=JBossAdmin (username=role) line to the jmx-console-roles.properties file
You can add the user through CLI in Jboss AS 7 which in turn stored in mgmt-users.properties in JBOSS_HOME/domain/configuration & JBOSS_HOME/Standalone/configuration/ directory.
I have an ubuntu system but the step to add the user is same through cli :
Through terminal go to bin directory path of Jboss7
type ./add-user.sh
Then create the type of user which you want.
This link will help you and explain much in details :
http://www.mastertheboss.com/jboss-as-7/adding-users-with-jboss-as-7
Note : for windows you have to run the add-user.bat file instead of .sh