Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't add or delete nginx user #1666

Closed
Fudo7sei opened this issue Oct 7, 2024 · 1 comment
Closed

Can't add or delete nginx user #1666

Fudo7sei opened this issue Oct 7, 2024 · 1 comment
Labels
no basic support info Please follow the guidelines so we can help

Comments

@Fudo7sei
Copy link

Fudo7sei commented Oct 7, 2024

  • What OS are you T-Pot running on?
    image

  • What T-Pot version are you currently using (only T-Pot 24.04.x is currently supported)?
    latest

  • What architecture are you running on (i.e. hardware, cloud, VM, etc.)?
    Proxmox

  • How long has your installation been running?
    3 days

  • Please provide a screenshot of htop and docker stats.
    image
    image

  • How much free disk space is available (df -h)?
    image

  • On Linux: What is the status of the T-Pot service (systemctl status tpot)?
    image

Hello !

So, my problem i that i can't add or delete nginx users as described here : #157 . The solution given here don't work for me, i have followed theses steps (as root) :
1- systemctl stop tpot
2- htpasswd /home//tpotce/data/nginx/conf/nginxpasswd newuser
password
re-enter password
(validation of the command)
3- systemctl start tpot

The problem occur at the 3rd step : when tpot containers start again, the nginxpasswd is overwrited as before.. any solution ?

@github-actions github-actions bot added the no basic support info Please follow the guidelines so we can help label Oct 7, 2024
@Fudo7sei
Copy link
Author

Fudo7sei commented Oct 7, 2024

Ok i've find the solution with chatGPT for those who ask :

To add an Nginx user for your T-Pot installation, you can follow these steps:

Use the htpasswd command to create a new user and encode the credentials in base64 format.
Replace "username" and "password" with your desired username and password:

htpasswd -n -b "username" "password" | base64 -w0

For example, if you want to create a user with the username "admin" and password "admin123", run:

htpasswd -n -b "admin" "admin123" | base64 -w0

This will output a base64 encoded string.

Open the $HOME/tpotce/.env file.
Find the WEB_USER variable, which defines the Nginx users.
Replace or append the WEB_USER variable with the generated base64 string from step 1. For example:

WEB_USER=dXNlcm5hbWU6cGFzc3dvcmQ=

Once you've updated the .env file with the new user credentials, restart the T-Pot service to apply the changes:

sudo systemctl restart tpot

@Fudo7sei Fudo7sei closed this as completed Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no basic support info Please follow the guidelines so we can help
Projects
None yet
Development

No branches or pull requests

1 participant