-
Hi, https://pexpect.readthedocs.io/en/stable/ to help me interpret output from the WebDAV server. I am trying to run this script as a Linux systemd service. When I run the script by hand, it works as I intend. Specifically, I don't need to provide a login or password. When I attempt to run the script as a service, the WebDAV server keeps asking me to provide a login and password. I do run the service as a user service: https://wiki.archlinux.org/title/systemd/User with my account setup to linger: https://www.freedesktop.org/software/systemd/man/loginctl.html The fact that I can run my script by hand successfully suggests to me that some environmental variable is being used by cadaver to satisfy the WebDAV server, and when I run the script as a service, that variable is undefined. I noticed this in the cadaver man page: cadaver supports automatically logging in to servers requiring authentication via a .netrc file But, I don't have a .netrc file. Am I on the right track about environmental variables, or is there some other reason why this isn't working? Thanks, Jason |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
I created a .netrc file and that appears to allow the service to run without the need for additional authentication. But, a .netrc file was not necessary when running my script by hand. So, I'd be interested to know if other factors are involved in authenticating a user using cadaver. Thanks! |
Beta Was this translation helpful? Give feedback.
-
If you have Kerberos authentication set up on the server then cadaver should log in without an interactive username/password prompt. Otherwise there is nothing else possible that I can think of - creating a .netrc file is the right solution as you suggested. |
Beta Was this translation helpful? Give feedback.
I created a .netrc file and that appears to allow the service to run without the need for additional authentication.
But, a .netrc file was not necessary when running my script by hand. So, I'd be interested to know if other factors are involved in authenticating a user using cadaver.
Thanks!