Results 1 to 3 of 3
  1. #1

    passwording a tar.gz file

    im doing a remote backup with one of my friends server, he backup his files on my server and i backup my files on his server..

    i was wondering if i can passwrd protect a tar.gz file, i usuly do a :
    tar -czf /tmp/backup.tar.gz /home/backup

    i want to know if there is a way to put a password on the file backup.tar.gz so no one can open or extract the file.

    dose tar support (passwords) ?
    a person who asks a Questionis a fool for five minutes,
    a person who doesn't is a fool Forever...

  2. #2
    I think it doesn't support passwords.... but there should be a tool that does password protect file.... never needed it on unix thought..

  3. #3
    Join Date
    May 2001
    There are more secure ways, but this works fairly well. Just

    1) put the following in an .htaccess file in the same dir as filename.tar.gz

    <Files filename.tar.gz>
    AuthType Basic
    AuthName "RESTRICTED"
    AuthGroupFile /dev/null
    AuthUserFile DIRECTORY_PATH/.htpasswd
    require valid-user

    2. Create a file named .htpasswd and add as many usernames as you like. Be sure and encrypt the passwords. They should look like the below with username:password

    Last edited by chrisb; 09-12-2002 at 02:41 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts