[SOLVED] Can't figure the right repository URL for proxmox-backup-client

salan54

Member
May 4, 2022
3
0
6
Hi,
PBS is running on 192.168.2.207 on my local network
My user (in the GUI) is root@pam
Datastore is ssd1 and namespace asd2
I tried a lot of combinations like :
export PBS_REPOSITORY="root@pam@192.168.2.207:8007:ssd1/asd2" (I tried with and without port 8007)
Each time I run : proxmox-backup-client status , I get :
Error: unable to parse repository url 'root@pam@192.168.2.207:8007:ssd1/asd2' (or something similar relative to the URL I tried)

Could you help me to get the working url to reach the PBS ?
Thanks.

PS :
ping 192.168.2.207 is working,
nc -zv 192.168.2.207 8007 is working
And PBS is perfectly working through the GUI, backing and restoring all my VMs
 
Thanks @ggoller ,
That's better ;)
It looks like I'm able to connect, but my user root@pam seems to lack permissions :

Code:
$ sudo -s
# export PBS_REPOSITORY="root@pam@192.168.2.207:8007:ssd1"
# export PBS_PASSWORD='XXXXXXXXXX'
# export PBS_FINGERPRINT="9c:.......:56"
# proxmox-backup-client backup --ns asd2 root.pxar:/
Starting backup: [asd2]:host/asd2/2024-07-12T12:26:25Z
Client name: asd2
Starting backup protocol: Fri Jul 12 13:26:25 2024
Error: permission check failed.

However, when I check the permissions for this user (the only one on the PBS) I think he has all of them !!!
And I'm running the commands as root (sudo)
Do you see anything wrong in my setup?
Thanks for your help

Looking in the PBS logs, here is what I found :
Code:
Jul 12 13:35:10 pbs proxmox-backup-api[528]: pam_unix(proxmox-backup-auth:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=::ffff:192.168.2.8  user=root
Jul 12 13:35:11 pbs proxmox-backup-api[528]: authentication failure; rhost=[::ffff:192.168.2.8]:57450 user=root@pam msg=authentication error - SUCCESS (0)
Jul 12 13:35:14 pbs proxmox-backup-api[528]: POST //api2/json/access/ticket: 401 Unauthorized: [client [::ffff:192.168.2.8]:57450] permission check failed.

Apparently, the machine I want to backup (192.168.2.8) has no permission to access the PBS...
What are the steps to allow 192.168.2.8 to authenticate on the PBS?
 
Last edited:
This looks exactly like if your password is wrong :) Maybe try without the PBS_PASSWORD env variable and with the console input.
 
Well, @ggoller , you were right :eek:... I use the same PWD directly through the console input and now it works.

I believe the problem stems from the fact that my password includes an exclamation mark (!). It seems this special character doesn't play well with environment variables in my setup.

While this solves the immediate issue, I still need to find a way to make this work unattended via a bash script. I'm considering two options:
1. Figure out a way to properly escape the special characters in the environment variable
2. Change my root password to one without special characters (though this isn't ideal)

If anyone has experience with handling special characters in passwords for automated scripts, I'd appreciate any advice!

A big thanks to @ggoller for the helpful suggestion.
Your patience and support are greatly appreciated!

Best regards,
 
Some special characters are just "more" special then others, like !, but have you tried using the minus symbol instead of the exclamation mark?
Or otherwise, looking at it again, it seems you have the password in single quotes instead of double quotes

Also with a quick google found this, maybe interesting to try out in your case:
https://docs.oracle.com/en/cloud/sa...anagement-common/cepma/special_chars_pwd.html
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!