Neo4j -How to set up username and password - neo4j

I tried to set up username and password for Neo4j instance running on linux machine. I couldn't find any documentation.Please let me know how to do this.

After going to localhost:7474 in your browser, go to the :server connect prompt and enter the default login info:
user: neo4j
password: neo4j
it should then ask you to change your password. You're now connected.

The username used on install as a service by default is neo4j, group is also neo4j.
I think you can configure the used user in conf/neo4j-wrapper.conf
# Name of the service
wrapper.name=neo4j
# User account to be used for linux installs. Will default to current
# user if not set.
wrapper.user=
You change the password for an user on Linux with passwd, see man passwd for details.

start the Neo4j server.
- Open the url(http://127.0.0.1:7474/browser/) in browser.
- click on Database icon from left side menu.
- Find "Connected as" -> :server user add , click on and add your desire user name and password in right windows.
Open the url http://localhost:7474/db/data/
this will prompt the user name password authentication windows. enter the added user/password created above and click on OK.

Neo4j doesn't have the support for using a username and password for accessing the database (as you would do with MySQL for instance). So you have to rely on other security mechanisms, like for instance the security groups in AWS, or a firewall. You may want to check the documentation and the other stackoverflow questions on this matter:
http://docs.neo4j.org/chunked/stable/security-server.html#_server_authorization_rules
How to secure access to neo4j remote shell?

Related

Install Jenkins on windows with service account

I am trying to install Jenkins on Windows 10. When I run the windows installer, it asks for a user account. Which account is that? I create an account in Jenkins but when I do test connection, it says "User name and/or password incorrect".
Can someone please help me here?
Thanks!
If you are on Windows 10 what you can do is:
use the window search bar to search for Local Security Policy and open it.
Click on Local Policies
Click on User Rights Assignment
By the right side showing the policies, open Logon as a service
Click on Add User or Group button.
In the input part written enter the object name, input the account name you created that you want to change to a service account.
Once you have inputed it, click on Check Name to verify.
finally click ok and you are good to go, you can now use the account while installing Jenkins.
Based on your question, following is what I am guessing,
If you are installing Jenkins from an installer and it asks for windows username/password, then your login might need higher privilege(Administrator) rights to install further.
If the installation is successful, then initial username is "admin" and password could be located at,
$JENKINS_HOME/secrets/initialAdminPassword
cat /var/lib/jenkins/secrets/initialAdminPassword
Check these links - ubuntu, windows
I suppose you got the error when you tried to install Jenkins and selected Logon Type Run as service as local or domain user.
If so, I ran into the same problem. I solved it by creating a new user on windows.
Type Add, edit or remove other users and double klick it
In the new dialog under Other users select Add someone else to this PC
Click on I don't have this person's sign-in information
Click on Add a user without a Microsoft account
Enter username and password
Enter the new credentials into Jenkins installer dialog
Refer to my anwser to a similar question. It is asking for a Windows account with "Log on as a service" permission. This is the account Jenkins app will run under.
These steps helped for me:
Download the latest Jenkins war from https://www.jenkins.io/download/
Keep it program files folder (e.g. C:\Program Files (x86)\Jenkins)
Start Jenkins (java -jar jenkins.war)
Check console.
Now stop this Jenkins instance (Cntrl +C)
In "Services", find the Jenkins and set the credentials one more time in the "Logon" tab. Save changes.
Now start the old instance through service, it should start normally and old jobs should appear at the console.

jenkins installation windows 10 "Service Logon Credentials"

I don't know Jenkins at all. I want to install Jenkins on Windows 10. I downloaded the installer and ran it, but I have a problem. I don't know what to enter in the "Account" and "Password" fields on the "Service Logon Credentials" stage.
if I use the username and password of my Windows account(with administrator privileges) the following information is displayed:
When installing a service to run under a domain user account, the account must have the right to logon as a service. This logon permission applies strictly to the local computer and must be granted in the Local Security Policy.
Perform the following to edit the Local Security Policy of the computer you want to define the ‘logon as a service’ permission:
Logon to the computer with administrative privileges.
Open the ‘Administrative Tools’ and open the ‘Local Security Policy’
Expand ‘Local Policy’ and click on ‘User Rights Assignment’
In the right pane, right-click ‘Log on as a service’ and select properties.
Click on the ‘Add User or Group…’ button to add the new user.
In the ‘Select Users or Groups’ dialogue, find the user you wish to enter and click ‘OK’
Click ‘OK’ in the ‘Log on as a service Properties’ to save changes.
Then try again with the added user.
(Source)
Below solution worked for me on Windows10.
Select Logon Type = Run Service as Local System ,click Install and complete the setup
To unlock Jenkins, Go to C:\Program Files\Jenkins and open jenkins.err
Get Administrator password ,paste and Install suggested plugins.
Create first admin user and start using Jenkins
Follow Chanaka Karunarathne's answer, just in the 'enter the object name to select' section enter your PC's user name. If you do not know what is your user name then just open a command prompt and run 'whoami'.
I followed this procedure to install Jenkins and it worked like a charm,
https://www.youtube.com/watch?v=1_Zs0gQq1Yc
Step1:
Download the "jenkins.war" file.
Step 2:
Run this command java -jar jenkins.war
Step 3:
Copy the secret that you get from this location,
C:\Program Files (x86)\Jenkins\secrets\initialAdminPassword
Use this Key when prompted to "Unlock Jenkins",
If you are a windows 10 home user, you need to download and install GPEdit.msc in Windows 10 Home using PowerShell script before you can use "Local Security Policy". you can download it from here.
I was be able to follow https://stackoverflow.com/users/4309588/chanaka-karunarathne's suggestion, but when it went to the next step, I tried to enter my "admin"(aka laptop login credentials), in my case I usually login with the 4-digit code to my Windows; and even if I use the password associated with the account, it would be my email as username and it's windows password as password, but I have setup two-step authentication for my email as well. it would not work.
I ended up username + 4 digit pass-code would not work on this
username(email address) + password would not work as well (due to the MFA)
I don't know why it had to be this difficult to login to Jenkins (or not sure if I should be upset about myself for setting up MFA for my email :) )
#elysium You can solve such problem by switching from Microsoft Account to Local Account for your computer. On assuming that your computer is similar to mine, you can navigate as follows;
Press/Click the Microsoft Windows tab on your keyboard.
Navigate to your profile picture and click on "Change Account Settings"
Navigate to Log in with Local Account instead and make the switch from Microsoft Account to Local Account.
Follow #Chanaka Karunarathne 's instructions. If you cannot find Local Security Policy, Go to search and type winver to confirm if you are using either of this OS versions ; Windows 10 Pro, Windows 10 Education, Windows 10 Pro Edu, Windows 10 Enterprise, Windows 10 Pro Workstation) otherwise Windows 10 Home lucks Local Security Policy, atleast for my case.
Alternatively, as mentioned in some previous comments here, to enable Group policy in Windows 10 Home, download a from here, right click on it run as administrator. Press Window Key + R, type gpedit.msc to check if Group policy has been enabled as described in this majorgeeks youtube channel (https://www.youtube.com/watch?v=7wkgwEhtqdI&ab_channel=majorgeeks)
In Windows 11, I am getting the same error even though provided user and password are correct. So I have installed Jenkins as LocalSystem.
After completion of installation, I changed it from the services and it worked for me.

I can't find where to specify new credentials for my neo4j connection in the desktop browser

I've successfully changed my username and password for my neo4j database and I can successfully connect from my app. However now I cannot log in from the desktop browser.
Every attempt to run :server connect returns the same message, indicating that I'm still attempting to connect as user "neo4j", that the database access requires an authenticated connection, and that connection credentials are stored in my web browser.
I've checked everywhere I can think of for where these credentials are stored so I can change the user I am attempting to authenticate with.
Where is this information stored and how can I change it?
This may solve your issue. In the neo4j Desktop window:
Select your Project in the left pane.
Click the Manage button of the appropriate Graph in the right pane.
Click the Administration tab.
Set your new password.
I found the solution. I had to use :server disconnect and then :server connect, which allowed me to re-enter new credentials.

How to configure auto login feature into Freeradius

I Installed Freeradius Service, MySQL and Imported freeradius's Database Schema to Mysql
I Configured Mikrotik to FreeRadius
I created User and Password into MySQL and I have Captive Portal Design
Now Everything is Okay.
Users can Login only by one click as a free access user.
How to configure Auto Login feature, not to ask users to click on the login button on second time .
To Solve it , I created a Script . when user connect to the network there is a script running to check if this is a new user , so i will save the coming data from mikrotik Like ( Mac Address ) to File .
If this is not a new user , i will connect him to the network directly .
You have to modify the authorize section in radius config file and create a query to identify "whitelist" MAC, then, if found, change the Auth-Type to accept.
well documented on freeradius forum

KeyCloak Forgot password Email link

We are implementing Authentication using keycloak. Specifically for forgot password option: When user clicks on Forgot password option, and provides user name, an email will be sent to their id with the link to reset password.
My Question is specifically on the link:
The link sent out in email looks like below:
https://:/auth/realms//login-actions/reset-credentials?code=
But the mentioned is really an internal physical host name that can be found in /etc/hosts, but it is not accessible to external users, so we need to replace this host:port number.
The code in .ftl file looks like below under themes/base/email/html/password-reset.ftl:
${msg("passwordResetBodyHtml",link, linkExpiration, realmName)}
While figured out from admin console on where the values for linkExpiration and realmName (They are under Realm Settings in admin console), I am unable to find out how and where the "link" is configured. Can someone please help with this?
I looked up other threads and did some findings, and found this link:(Keycloak - URL Reset Password email behind a proxy, but it really talks about NginX proxy, which we haven't configured.
Got this resolved after multiple discussion with Redhat team. Below are the steps followed
We were using RH SSO 7.0.x: Added proxy-address-forwarding=true as below.
The server didn't start because this tag is not available in Keycloak 7.0.x. as confirmed by Redhat.
Did upgrade to RH SSO 7.2.0 and the same flag addition worked. Forgot password email content has the https:///auth/realms/archcap-au/login-actions/action-token?key=
Before change:
header=x-forwarded-host= <External Host>
header=Host= <Internal host:8443>
After Change:
header=x-forwarded-host= <External Host>
header=Host= <External Host>
the tag would retain the forwarded host header.

Resources