82

The config file is ambiguous, and keeps getting overwritten when you restart the daemon in Debian, anyway.

In /etc/transmission-daemon/settings.json, there are these options:

rpc-username
rpc-password
proxy-auth-username
proxy-auth-password

Every time I restart the daemon with:

/etc/init.d/transmission-daemon restart

It overwrites rpc-password, and the password it prints doesn't work anyway.

Does anyone know how to set the password properly? I don't want to disable it.

Neil
  • 5,749

4 Answers4

142

Do these things in the exact order:

  1. Shutdown: /etc/init.d/transmission-daemon stop
  2. Write the rpc-password in the /etc/transmission-daemon/settings.json file, in double-quotes. Make sure rpc-authentication-required is true.
  3. Save that file
  4. Startup: /etc/init.d/transmission-daemon start
  5. Login to the page, it's at port 9091
  6. Type in your password.

The password that's being overwritten is a hash. The program is smarter than usual and detects that your password is not a hash, so it overwrites the password with the hash to be secure. So your password should work.

However, remember that it writes the password it loaded with when it shuts down. So doing /etc/init.d/transmission-daemon restart will not do what you expect if you've written the file while it's running.

Neil
  • 5,749
4

Genrally the daemon writes its settings when it exits (or is restarted). You can force the daemon to reload new settings by sending it SIGHUP:

kill -HUP 1234

...then it will not overwrite your settings anymore when stopping.

BTW: I'm not happy that transmission-remote-cli wants to have the password on the command line. Bad idea!

jm73
  • 41
2

You can also try another solution to find the password:

ps -ef | grep transmission

(to my version it was admin:password1)

matan129
  • 1,990
phoenix
  • 21
1

While this post already has an accepted answer, I find it worth adding that in Ubuntu the transmission-daemon is actually not stoppable once started.

This means that any changes you do to settings.json will get overwritten on next restart, whenever that is.

This also means that you have to completely disable daemon-startup on boot, reboot, edit your settings.json and then re-enabling it to make the changes you do persist.

Pretty annoying, but once you're aware of what's going on, it's fairly easy to cope.