[SOLVED] How to supply the unrar password

Get help, report and discuss bugs.
MrVideo
Posts: 47
Joined: 20 Mar 2019, 05:44

[SOLVED] How to supply the unrar password

Post by MrVideo » 20 Mar 2019, 05:56

Version 20
Linux - Fedora 27

I tried searching the forum for the answer, but I came up blank. The online documentation doesn't seem to cover this either.

When I put a nzb file in the queue, everything goes fine until it tries to unrar the first downloaded file. It fails because of a wrong password. Makes sense, as I have no idea how to supply the password at the time the nzb is placed into the queue.

How does one go about supplying the password?

BTW, I run nzbget in a terminal: nzbget -s -c ~/nzbget.conf

Thanks for any pointers.
Last edited by MrVideo on 20 Mar 2019, 11:36, edited 1 time in total.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: How to supply the unrar password

Post by hugbug » 20 Mar 2019, 09:50

When adding items via web-interface: in the add-file dialog, after the file is chosen and shown in the dialog, click on the file-name, that brings the dialog to set password.

The password can also be set for already queued items - click on item in queue, then button Postprocess.

MrVideo
Posts: 47
Joined: 20 Mar 2019, 05:44

Re: How to supply the unrar password

Post by MrVideo » 20 Mar 2019, 10:06

Thanks for the info, but as I mentioned, I am running the command line version. I'm not using the web interface. I'm therefore guessing that it can't be done via the terminal interface.

MrVideo
Posts: 47
Joined: 20 Mar 2019, 05:44

Re: How to supply the unrar password

Post by MrVideo » 20 Mar 2019, 10:46

I've been doing a little more digging regarding commandline options.

I have no idea if this will work:

Code: Select all

nzbget -c ~/nzbget,conf -E O "password=rar_password" nzb_filename
The online manual has no "O" listed for individual file editing, only in the "G"roup editing. The manual does not list any of the available postprocessing names that can be edited/set. Something that can be added to the online web page?

It is really no big deal if I can't get this to work, as I'll just do it the way I do it now.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: How to supply the unrar password

Post by hugbug » 20 Mar 2019, 10:57

What are the reasons to avoid web-interface? The web-server is running anyway.

If you still want to do that the hard way the password can be set after adding to queue with:

Code: Select all

nzbget -E G O "*unpack:password=mypassword" 123
Were "123" is the ID of nzb-file which is printed by:

Code: Select all

nzbget -L G

MrVideo
Posts: 47
Joined: 20 Mar 2019, 05:44

Re: How to supply the unrar password

Post by MrVideo » 20 Mar 2019, 11:12

hugbug wrote:
20 Mar 2019, 10:57
What are the reasons to avoid web-interface? The web-server is running anyway.
You know, no real reason. More in a moment.
If you still want to do that the hard way the password can be set after adding to queue with:

Code: Select all

nzbget -E G O "*unpack:password=mypassword" 123
Were "123" is the ID of nzb-file which is printed by:

Code: Select all

nzbget -L G
If I run the command, via the web interface, or the commandline, and it is done after the first file has been downloaded, does nzbget go back and unrar the first file?

In the meantime I've been attempting to access the web server with no luck. At first I got a 503 error and after some searching found what to look for. I had a minor error in the config file (I left a # on a line I copied and edited). Once I did that, I got a 404 error. I understand that to mean it can't find the config template:

Code: Select all

ConfigTemplate=${AppDir}/webui/nzbget.conf.template

BRN <60> dir /usr/local/bin/nzbget/webui/nz*             
-rw-r--r--. 1 1001 66846 Jun  6  2018 /usr/local/bin/nzbget/webui/nzbget.conf.template
As can be seen, it is there.

Should I open a separate thread regarding this issue?

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: How to supply the unrar password

Post by hugbug » 20 Mar 2019, 11:28

MrVideo wrote:
20 Mar 2019, 11:12
does nzbget go back and unrar the first file?
If direct unpack is disabled then unpacking is performed during post-processing stage; that's when the password is needed. If direct unpack is active the unpack attempt will be made after the first rar-file is downloaded. If the unpack fails due to wrong password the next unpack attempt will be made during post-processing (after all is downloaded).

Error 404 means option "WebDir" isn't correctly set.

MrVideo
Posts: 47
Joined: 20 Mar 2019, 05:44

Re: How to supply the unrar password

Post by MrVideo » 20 Mar 2019, 11:28

Found it. The instructions regarding using the webui and the setting of WebDir is a little vague. I changed all of the ${AppDir} settings to ${MainDir}, as it points to my NAS server, where I place downloads. It doesn't say, even in the config file, that WebDir should point to the installation location and that if you point it to a new location, everything in the installation webui needs to be copied to the new webui location.

A light went off and I reset the config file to leave it pointing to the install location.

MrVideo
Posts: 47
Joined: 20 Mar 2019, 05:44

Re: How to supply the unrar password

Post by MrVideo » 20 Mar 2019, 11:35

hugbug wrote:
20 Mar 2019, 11:28
If direct unpack is disabled then unpacking is performed during post-processing stage; that's when the password is needed. If direct unpack is active the unpack attempt will be made after the first rar-file is downloaded. If the unpack fails due to wrong password the next unpack attempt will be made during post-processing (after all is downloaded).
Everything is at default for unpacking.

Hopefully I have everything up and running now. Thanks for your help.

hugbug
Developer & Admin
Posts: 7645
Joined: 09 Sep 2008, 11:58
Location: Germany

Re: [SOLVED] How to supply the unrar password

Post by hugbug » 20 Mar 2019, 11:42

MrVideo wrote:
20 Mar 2019, 11:28
I changed all of the ${AppDir} settings to ${MainDir}, as it points to my NAS server, where I place downloads.
Make sure QueueDir is on a local drive (not on NAS). Otherwise the queue may be easily corrupted if NAS becomes unavialbale for a moment.

TempDir is also better to have local. And for best performance InterDir should be local too.

In other words: only DestDir belongs to NAS.

Post Reply

Who is online

Users browsing this forum: No registered users and 59 guests