Default Jenkins User Password - linux

I have a fresh install of Jenkins as a service on my Linux machine. When Jenkins installs, it creates a 'jenkins' user, but I can't seem to find the default password for it anywhere.
I'm trying to secure my system, so if the default password is '123' or something insecure that I just haven't thought of yet, that's a problem.
Thanks!

I don't believe it has any password. You should be able to do:
sudo passwd jenkins
This will prompt for you to set a password.
Alternatively you could create the jenkins user prior to installing, and it would leverage that one.

For fedora,
Go to /root/.jenkins/
open config.xml
In config.xml, set disableSignup to false.
Restart Jenkins.
Go to the Jenkins web page and sign up with a new user.
In config.xml, duplicate one of the hudson.model.Hudson.Administer:username lines and replace username with the new user.
If it's a private server, set disableSignup back to true in config.xml.
Restart Jenkins.
Go to the Jenkins web page and log in as the new user.
Reset the password of the original user.
Log in as the original user.

Default password for user jenkins is just "jenkins". However, logging into this user automatically closes your session (probably it is set to be used only to allow using particular computer as a jenkins agent, but I'm not sure). That't why su - jenkins and typing jenkins do not work.
You can try logging as a jenkins user with ssh and you will see that it works, but suddenly the session is closed:
I believe there is a solution for this, but maybe it is not needed in your case. Really need to use system as a jenkins user? Doubt it.

C:\Windows\system32\config\systemprofile.jenkins\secrets\
goto above mentioned path and find
"initialAdminPassword" click that file and copy value
this is password for jenkins!

Related

What means terminal prompts disabled?

I use gitlab since some years.
After an update of my mac book, one application fails on deploy with deployer.
fatal: could not read Username for 'http://mygitlab.org:22': terminal prompts disabled
I use the same gitlab server for all projects. The other projects are working well.
I compared the gig config file. No differences between the applications.
I tried to set/change the username. No success
I created a new repo on gitlab, and cloned it into my php storm. No success
Has someone an idea, where i have to search?
Thanks in advance!
Check the URL of that repository. A port 22 is the default one used by SSH, so seeing an HTTP URL used is strange, and would trigger a prompt for the username.
This differs from a git#mygitlab.org: URL (or ssh://git#mygitlab.org:22/...), which should not need any prompt, if the right SSH key is used (and has no passphrase, or if the passphrase is cached in an ssh-agent).

How to run linux without any DesktopEnvironment?

I have Manjaro installed on my system and for the Desktop Environment I have XFCE4 and for login manager LXDM everything works fine
but when I try to change some of the lxdm-config option I can't login to my user, the problem came from that I disable that option to shown the select session panel and after logout when I try to login again but after type password and press enter back to select user again!
I have no access to terminal or my user account to change the config again and back it to default or change the login session to xfce4
How can I access to terminal to change config or access to desktop or how can I fix this problem?
Thanks,
Try using ALt+Ctrl +FnKey. Fn key from 1 to 6 would lead you to the terminal shell. you can use all the bash commands over there.
You may restore the configuration file from there.
To reset display settings back to defaults (XFCE), this link may help you.

jenkins Access Denied- asdf#gmail.com is missing the Read permission

i am using Jenkins war 1.520 in Ubuntu 12.04 i had configured jenkins with openid plugin and authenticated with Google apps. I made some changes in role based security and matrix based security why prompts me
Access Denied- asdf#gmail.com is missing the Read permission
please let me know, what needs to be done in order to get the access to jenkins
You will have to reconfigure your permissions. Do you still have a user with login access or not ? If not you might have to reset it by temporarily disabling the security. This can be achieved by modifying the $JENKINS_HOME/config.xml ($HOME/.jenkins/config.xml by default when running the jenkins.war on your system) and setting <useSecurity> from true to false. Be sure to backup your config!
Once you are there reenable the security, and show us what you have in matrix and role based security.
Had the same issue with Jenkins, turns out my user name was Gideon but error I was getting was 'gideon is missing the overall administer/register permission'. Edited config.xml by changing Gideon to gideon in the /hudson/authorizationStrategy/permission tags and everything is working fine now.
My permissions file was here:
/var/lib/jenkins/config.xml
As suggested in Disable security page, you need to edit config.xml in your $JENKINS_HOME (e.g. /var/lib/jenkins) and remove lines with useSecurity, authorizationStrategy and securityRealm, then restart Jenkins.
See: Jenkins Github Authentication error: user is missing the Overall/Read permission

Problem performing svn export using Hudson that run as a service

I have a script that perform a build as well as performing svn export. When I run hudson manually, by running it from a root user, I can do a build and svn export without a problem.
If I call hudson using a service (chkconfig), hudson runs okay. SVN checkout (assume this is URL1) is also fine since the credential is stored in hudson config. However, when my script tries to perform svn export (different from URL1; let's say this is URL2), it always fail. It says "Password for 'root': Authentication realm". This is basically error because my build server cannot provide the necessary credential to login into svn. This is what I don't understand, because I store the svn credential in my root account, and have no problem performing svn update/svn info to URL2 from the shell or when I start hudson manually (not as service).
My guess right now is that when we are running an app as a service, it does not load some/all stored user configurations? Any idea how can I force the service to load my svn credential? Any other solution/insight is also welcome.
Btw, my build server is running Red Hat 5.6
Thanks!!!
Can't give you a detailed answer, but one of the differences between an interactive shell and when running as a service is the first starts up by reading ~/.bash_profile, while the second runs ~/.bashrc
Try to compare the two!
Comparing the output of env in both contexts (within hudson and within your shell) should help you troubleshoot this.
By default, SVN stores user credential in their corresponding home directory. When a server is restarted, it will not load your profile (in my case, /etc/profile) as pointed by Tobu. So to solve this problem, we simply need to set the HOME folder to the correct location. Modify your service script for your apps to include the following line:
HOME=/<<user home folder location>>
This solves my problem.

Setting up a local SVN repository with encrypted passwords with TortoiseSVN

I am planning on using a local repository, using only TortoiseSVN's "create repository here" feature.
The repo is created and I can read and write to it just fine. The problem is that I can't get authentication to work. I thought I wanted Windows authentication, but I actually want the simple text-file based authentication so I can force the current system user (i.e. any person can be using the same Windows account and I want to differentiate between them) to provide their name and password. I haven't found any information on how to do this without svnserve running.
So far, I have modified svnserve.conf like this:
anon-access = read
auth-access = write
password-db = passwd
realm = LocalOnly
I didn't mess with the [sasl] section.
I also modified passwd:
[users]
harry = teH0wLIpW0gyQ
I am trying to use encrypted passwords created with a simple perl script. However, regardless of what I do with the repo (i.e. including writing to the repo), I am never prompted for a password.
I tried clearing TortoiseSVN's authentication cache since I do connect to a remote repo, but this didn't matter at all.
Has anyone tried this and succeeded? Or is it not possible without svnserve?
Not possible without svnserve - it takes care of the challenge/response.
Try Subversion Edge. you can edit the file you are mentioning using the GUI provided by the tool. It uses its own http server(not svnserve or IIS).
Unfortunately your best bet with a local repository is to use your file system permissions. A simple and free option for a server (that's easy to manager) would be VisualSVN Server. You can hang it off or a workstation or drop it on a public webserver somewhere. I now have mine setup with a reverse proxy with IIS7 so it's integrated with the rest of my web site.

Resources