How to assign admin role to root - youtrack

I've removed the 'Admin' role from root and noone has the permissions to put it back! Is there a way to assign the admin role to root on the command line or somewhere else outside of the application (UI)?
This is a Windows 7 installation and YouTrack is running as a Windows Service.

I've succeeded with restore reset password for youtrack windows 5.1.2 setting up -Djetbrains.charisma.restoreRootPassword=true on the key "Options" in the registry
Edit:
On 64-bit Windows, the registry key is:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Apache Software Foundation\Procrun 2.0\YouTrack\Parameters\Java
32bit Windows
HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Procrun 2.0\YouTrack\Parameters\Java
Thanks to the guy from
https://stackoverflow.com/a/8610301/1384477

About your only option as far as I'm aware is to boot into a live environment and edit the user:groups files manually, assuming the file system isn't encrypted.

On windows installation you can try the following:
Stop YouTrack service
Navigate to ${YOUTRACK_HOME}/webapps/ROOT/WEB-INF/web.xml. Backup it.
Modify config file as follows:
<web-app>
<display-name>YouTrack</display-name>
<servlet>
<servlet-name>MainServlet</servlet-name>
<servlet-class>jetbrains.charisma.main.ServletImpl</servlet-class>
<!-- Add this parameter -->
<init-param>
<param-name>jetbrains.charisma.restoreRootPassword</param-name>
<param-value>true</param-value>
</init-param>
<!-- End -->
...
</servlet>
...
</web-app>
Now start YouTrack, your root account should have everything reset to default, including credentials and permissions.
It makes sense to restore the config file back to initial state afterwards, not to have your account reset on every application restart.

Related

websphere liberty admincenter datasource

Recently, I switched to the websphere liberty 8.5.5.9. The adminCenter replaced the admin console. I used to configure many things in the admin console of lower Websphere version. but in the new admincenter, I couldn't find them any more, e.g. configure a datasource. any suggestions?
The Admin Console is the UI for WebSphere Traditional whereas Admin Center is the UI for WebSphere Liberty. Just like there are differences between the functionality of WebSphere Traditional and Liberty, same can be said for Admin Console and Admin Center.
Although Admin Center does not provide a 'wizard' type of experience that Admin Console does, you can use the Server Config tool to create a datasource and it can help guide you through the process by showing all the fields that can be set (including any defaults). If you stay in the Design view for the configuration file (likely server.xml) of the server that you want to alter, you can select 'Add Child' and select 'Datasource.' If will then populate all the fields with descriptions and defaults:
Data Source in Design View of Server Config in Admin Center
You can get similar assistance in the 'Source' view by activating content assist via ctrl+space. This functionality is not unique to datasource, but is provided for all elements.
In WebSphere Liberty you can configure your DataSource directly in the server.xml (similar to most server-level configurations in Liberty).
Here is an example from the Liberty documentation:
<dataSource id="DefaultDataSource" jndiName="jdbc/derbyEmbedded">
<jdbcDriver libraryRef="DerbyLib"/>
<properties.derby.embedded databaseName="C:/databases/SAMPLEDB" createDatabase="create"/>
</dataSource>
<library id="DerbyLib">
<fileset dir="C:/db-derby-10.8.1.2-bin/lib"/>
</library>
To use a datasource, be sure to enable a JDBC feature in your server.xml, such as this:
<featureManager>
<feature>jdbc-4.1</feature>
</featureManager>
If you're not sure where to find your server.xml, by default it is in this location:
${wlp.install.dir}/servers/${your.server.name}/server.xml
For full doc on configuring data sources in Liberty, see: Configuring relational database connectivity in Liberty
In addition to editing the server.xml as described by aguibert, you can create and edit data sources using the Liberty AdminCenter as described in this IBM KnowledgeCenter topic.

Change Worklight Application status on Console using action file

I need to know if I can change the status of the application on Worklight Console using action file that I can run on the server.
Details:
In our production server, we need to change the status of the previous versions of the application from "Active" to "Active, Notifying" then to "Access Disabled".
This can be achieved from the WL console and we can write the notification message that will be sent to the user:
However, to avoid the "human" work on our Prod environment, we are looking to use an action file to be run on the server which will do the change.
Is this possible. Or this should be from the Console?
WL Version : 6.2.0.1
PS: We use an action file to change any property on our WebSphere server.
Action File example (Looking for something similar):
<?xml version="1.0" encoding="UTF-8"?>
<!--
Environment specific WebSphere configuration management XML file.
Warning: This file contains clear text passwords and, therefore, cannot be
distributed outside of the eCommerce group without masking the
password values.
-->
<!DOCTYPE WAS [
<!-- Environment specific parameters -->
<!ENTITY KEY_STORE_PATH "/was85/resources/security/ecommerce_bk_mobile.p12">
]>
<WAS>
<!-- Applications: Application Types: WebSphere enterprise applications -->
<Application
name="IBM_Worklight_project_runtime_MobileBanking">
<!-- Enterprise Applications > application_name > Environment entries for Web modules -->
<WebAppBinding _action="update"
description="[OPTIONAL] SSL certificate keystore location. Default: conf/default.keystore."
module="Worklight"
name="ssl.keystore.path"
uri="MobileBanking.war,WEB-INF/web.xml"
value="&KEY_STORE_PATH;"/>
</Application>
</WAS>
You cannot use "action files".
In Worklight, you can use the REST APIs services that allow you to manage... stuff, such as setting Remote Disable.
See here: http://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.apiref.doc/apiref/c_restapi_oview.html
And specifically for Remote Disable (info and example): http://www-01.ibm.com/support/knowledgecenter/SSZH4A_6.2.0/com.ibm.worklight.apiref.doc/apiref/r_restapi_app_version_access_rule_put.html

Open Daylight can not login and the ui of the web always display "unable to login"

I have install the Open Daylight Helium according to the document of wiki of installation. But, when I enable the webUI, it always displays "Unable to login" in the webUI.
How can I solve this problem?
This would be easier to answer if you described what you mean by the web UI. Nonetheless vaerify that you are testing the correctports, if you are then you can disable auth by editing org.opendaylight.aaa.authn.cfg
authEnabled=false
Obviously, we need to install feature of odl-dlux-core. And we can login to ODL's Web GUI successfully.
I had the same problem and I got it working by following the answer on this link:
https://ask.opendaylight.org/question/843/unable-to-login-dlux-web-interface-helium-release/
There it says:
Downloading and extracting the pre-build .zip : distribution-karaf-0.2.0-Helium.zip
./distribution-karaf-0.2.0-Helium/bin/karaf (on linux) to start the karaf container
feature:install odl-restconf odl-l2switch-switch odl-mdsal-apidocs odl-dlux-core
Accessing http://localhost:8181/dlux/index.html where localhost is your local ip
log in with user: admin pw: admin
Perhaps there is a problem with the order you have installed your features. I >got the order from dlux-wiki-page where they said that this is the recommended >way of installing features before starting the dlux feature.
To clean your local karaf container you can start the container using the clean >flag like "./distribution-karaf-0.2.0-Helium/bin/karaf clean" or delete the >"distribution-karaf-0.2.0-Helium/data/" folder.

RavenDB 2 returns 401 when trying to create database

This is a fresh install of Raven #2230, running on IIS8/Win8. When studio starts it offers to create new database, then browser pops up credentials window (401).
Web.config has add key="Raven/AnonymousAccess" value="All"/ set. Also tried add key="Raven/AnonymousUserAccessMode" value="All"/ as per documentation.
Anonymous Authentication on site is enabled, so is Windows Authentication.
Added Raven.Bundles.Authorization.dll to plugins folder (not sure if needed, but didn't make any difference).
Am I missing something ?
RavenDB as of today, is on version 2750 (stable). Upgrade and this issue should be fixed.
The way to do this is to set the AnonymousAccess setting in web.config to Admin:
<add key="Raven/AnonymousAccess" value="Admin"/>
You should change this back to All once you have created your database.

ExtendedFormAuthenticator in JBoss 7

I'm porting a legacy application from JBoss 4.2.3 to JBoss 7 (the web profile version). They used a custom login module and used a valve to capture the login failure reason into j_exception. They did this by putting context.xml into the web-inf directory of the war, with the following contents:
<!-- Add the ExtendedFormAuthenticator to get access to the username/password/exception ->
<Context cookies="true" crossContext="true">
<Valve className="org.jboss.web.tomcat.security.ExtendedFormAuthenticator"
includePassword="true" ></Valve>
</Context>
The login is working for me, but not that valve. When there's a login exception, the j_exception is still empty and the logic that depends on analyzing why the login was rejected fails. According to this link: http://community.jboss.org/wiki/ExtendedFormAuthenticator, everything looks right. However that link is very old, and it's possible things have changed since then. What's the new way?
It seems that security valves are now defined directly in jboss-web.xml, like this:
<jboss-web>
<security-domain>mydomain</security-domain>
<valve>
<class-name>org.jboss.web.tomcat.security.ExtendedFormAuthenticator</class-name>
<param>
<param-name>includePassword</param-name>
<param-value>true</param-value>
</param>
</valve>
</jboss-web>
However, the ExtendedFormAuthenticator class wasn't ported to JBoss 7.0.1. A ticket has been opened for me, so it should be present in JBoss 7.1.0:
https://issues.jboss.org/browse/AS7-1963