How to set admin user/pwd when launching Nexus docker image - nexus

When launchin Nexus 2 docker image ( https://hub.docker.com/r/sonatype/nexus/ ) how to configure it to change the default admin user password to something else than admin/admin123 ?
thanks.

#Zeitounator,
thank for you answer but in fact I did manage to change the admin password.
In the docker image you need to update the /sonatype-work/conf/security.xml file.
there is an admin section in which you need to change the password element
<user>
<id>admin</id>
<firstName>Administrator</firstName>
<lastName>User</lastName>
<password>change_password_here</password>
<status>active</status>
<email>changeme#yourcompany.com</email>
</user>
I am using kubernetes to launch Nexus, and by mounting the proper files I was able to change the password.
In order to generate a password I used the shiro tool hasher cli : https://shiro.apache.org/command-line-hasher.html

To change for the first time the admin password follow the following steps (docker
version only) :
Go to the Nexus container instance for example 91aefe723146
make a docker exec -it 91aefe723146 /bin/bash
Go to /nexus-data
get the password content of the file admin.password
log again to the admin console and put the password and reinit your password.
Done !

Related

Unathorized: incorrect username or password

I have cloned Microsoft eShopOnContainers repo and tried to run :- eShopOnContainers.ServicesAndWebApps but i have been getting following error while tried to run docker compose: -
3>Pulling nosql.data (mongo:)...
3>Get https://registry-1.docker.io/v2/library/mongo/manifests/latest: unauthorized: incorrect username or password
Docker Desktop is running and i have checked docker-compose-override.yml file in the project file but did not find any clue about the username and password option to either change or replace etc.. docker could not pull the image from docker hub i guess but failed due to unauthorized. How to set permission or authorization in the docker hub or else in the docker compose file. Any help is appreciated..
I got it fixed, this is outrageous how come docker desktop login fine with xzy#example.com, however when you pull images from docker hub it does not seem to recognize user already signed in through desktop docker. I had to sign-out from desktop docker and sign in with user id from CLI which is being shown in the docker hub but not the one which is being picked by docker desktop itself with email address. I don't get it...

Server vsFTPd connection failed

I am trying to connect on ftp localhost but the login/password always fail.
I have installed vsFTPd.
I guess i have to modify passwd.conf. But how must I process?
I have this line :
paul:x:1000:1000:paul,,,:/home/paul:/bin/false
Thank you!
You can set new password with passwd (enter).
or login with root privileges and type (sudo) passwd [username], and change password then.
And maybe need change config ftp server and set local_enable=YES and chroot_local_user=YES in the /etc/vsftpd/vsftpd.conf file config, for allow users in /etc/passwd to login.
You should add system user in chroot file like.
chroot_local_user=YES
chroot_list_file=/etc/vsftpd.chroot_list
after need to restart vsftpd service.
Visit here for more detail.

Can't get to the root on juniper ssg5

Can't get to the root on juniper ssg5
After i enter my login username and password I'm stuck on this prompt
'my-fw->'
my-fw-> copy
^------unknown keyword copy
my-fw-> show
^------unknown keyword show
my-fw-> configure
^-----------unknown keyword configure
why can't i get to root#my-fw-> or root#my-fw-# prompt. What can i do to get to root. I'm using putty to console to the juniper ssg5.
[Note- I'm trying to backup config to a tftp server where i require to get to the root access]
You don't need root access. root is an special account and all / most of the commands works without root account. Any account which has privileges to perform configuration changes, can apply the command to archive the configuration on given site.
See junos-os-login-classes-overview for user privileges.
The prompt we get is in this format: user#hostname> Ref
If there is no hostname defined, then it is just: user>
Once you make sure that you have logged in with correct user, i.e. it has requirement permissions, you should be able to execute those commands and apply archival configuration.
I have a working solution, let me know if above doesn't help.

Can't use Nexus Repository Manager 3.0 default admin user

Just installed Nexus 3.0.0-03, started up, followed the doc, but can't login with default admin/admin123.
The only error I can see is the login refusal message:Incorrect username or password, or no permission to use the application.
user name is admin
There is password in /nexus-data/admin.password path in your nexus host.
cat /nexus-data/admin.password
you must change your password at first login
also If you implement nexus through docker, you should use command below:
docker exec -it <container_name_or_ID> cat /nexus-data/admin.password
You cannot create another admin user via configuration (without going deep down the rabbit hole), the initial user admin/admin123 should work.
Faced the same problem.
Steps I took to resolve it:
Open the admin.password file inside sonatype-work>nexus3 and copy it's contents.
Paste the copied value from step 1(from the admin.password file) into the password field. Enter 'admin' for the username.
Look into location:
/home/[yourHomeDirName]/sonatype-work/nexus3/admin.password

Create User in Unix that can login via SSH

I created a User ("myuser") with a Password ("mypw") on a Unix server, whom I granted acces only to certain files.
I try to login to the server with ssh: $ ssh myuser#myserver.com and then I enter the password "mypw". Still, I am not granted access: "Permission denied, please try again."
Is there something I forgot / something additional I have to do with the user in order to give him access via ssh?
Seems a bit simple, but try sudo it?
Or Sudo su before running the command?
Did you manipulate keys at any point ? https://www.youtube.com/watch?v=oHoRYCY-LYU

Resources