Linux remove password from rar files

15,630

Some answers you could find here, which are generally sound. And the very popular answer is also here. You have to decompress and then recompress into a new RAR file. Then simply delete the old encrypted file and you've got yourself a fresh new RAR package without the unneeded password.

Create a new unprotected RAR file (e.g. containing an empty folder), then open the old protected one. Now drag the files into the new unprotected RAR. No extracting needed.

Or you can open the archive then rightclick on the file and choose "set default password" and then enter the password, this way you will never have to enter the password again anytime you want to open the file.

Share:
15,630
Saeed Vrz
Author by

Saeed Vrz

Updated on September 18, 2022

Comments

  • Saeed Vrz
    Saeed Vrz almost 2 years

    I have some password protected .rar files. I have the password. I want to remove the password from my files. I mean I want .rar files with the same name without password.

    My Linux OS has unrar and rar packages installed.

    Is it possible to do it with a single line script?!

    Thanks

    • Daniel B
      Daniel B almost 10 years
    • BenjiWiebe
      BenjiWiebe almost 10 years
      @DanielB Yes, it is possible. Your link is for removing the passwords without recompressing the file, which the OP doesn't mind doing.
    • Daniel B
      Daniel B almost 10 years
      @BenjiWiebe He’s asking for a single-line solution.
    • Saeed Vrz
      Saeed Vrz almost 10 years
      Thanks @BenjiWiebe for your comments, but, is it possible to "pipeline | " the file names inside the rar file ,which are going to be extracted, as an input for making another rar archive? or it needs a more professional code?
    • BenjiWiebe
      BenjiWiebe almost 10 years
      @user3077066 If it works, makes sense, and isn't too long, use it. IDK what the "professional" way of doing things is...I just follow the above advice.