Open a7mag3ddon opened 3 years ago
Create a session into the container while the container is running:
docker exec -it container_name /bin/bash
You are the root user in the container now. Run the following commands for creating a username, and saving a password:
sh -c "echo -n 'yourusername:' > /config/nginx/.htpasswd"
sh -c "libressl passwd -apr1 >> /config/nginx/.htpasswd"
You'll be prompted to enter a password, and verify it. That's it.
Next, exit the container shell by pressing CTRL+P and then CTRL+Q.
You can exit the container by simply typing exit
.
Hello, the issue here is me not the code.
I dont understand how to change password, i see there are 2 commands
sh -c "echo -n 'admin:' > /config/nginx/.htpasswd" sh -c "libressl passwd -apr1 >> /config/nginx/.htpasswd"
lets say i want to change password to MyP4ssword do i run
sh -c "echo -n 'admin:' > /config/nginx/.htpasswd" then sh -c "libressl MyP4ssword -apr1 >> /config/nginx/.htpasswd"
i am not good with linux but have managed to rutorrent installed in docker on my NAS and is running but i want to change defualt login :-)
many thanks for any help.