Results 1 to 8 of 8
I need to password-protect my directories, because I don't want my boss to see everything I save or download. He obviously knows the 'root' password and I'm not that familiar ...
- 12-11-2004 #1Just Joined!
- Join Date
- Dec 2004
- Posts
- 1
How can I protect a folder with a password?
I need to password-protect my directories, because I don't want my boss to see everything I save or download. He obviously knows the 'root' password and I'm not that familiar with Linux, so I don't know how to "hide" some of my directories from him.
Thanks!
- 12-11-2004 #2
Really you can't hide anything from root... but you could compress your folder with some format that supports encryption.
But why would you want to do that unless you do something you're not supposed to do at work?
Regards Scienitca (registered user #335819 - http://counter.li.org )
--
A master is nothing more than a student who knows something of which he can teach to other students.
- 01-05-2005 #3Linux Enthusiast
- Join Date
- Jun 2004
- Location
- Windsor, CO
- Posts
- 656
Encrypt them instead. root has access to everything, but if you actually encrypt the files instead, you're boss would have to be very smart indeed to access them. Although you'll be inviting his suspicion either way...
Emotions are the key to the soul.
Registered Linux User #375050
- 01-06-2005 #4Linux Engineer
- Join Date
- May 2003
- Location
- Greece / Athens
- Posts
- 1,169
take a look at the banner below!!
Linux For Ever!
- 01-06-2005 #5Linux Guru
- Join Date
- May 2004
- Location
- forums.gentoo.org
- Posts
- 1,814
Wow, stathisx, it's like the whole web knows what we're talking about :o
/IMHO
//got nothin'
///this use to look better
- 01-06-2005 #6Linux Engineer
- Join Date
- May 2003
- Location
- Greece / Athens
- Posts
- 1,169
does it matter??we don't talk about my pc!
Linux For Ever!
- 01-10-2005 #7Just Joined!
- Join Date
- Jan 2005
- Posts
- 4
Code:gpg --gen-key tar vc dir_to_encrypt | gpg -e -r you -o backup.tar.gpg wipe -rf dir_to_encrypt gpg -d backup.tar.gpg -o -|tar vx wipe ~/.bash_history
- 02-15-2008 #8Just Joined!
- Join Date
- May 2006
- Posts
- 11
I've been interested in adding passwords to files and directories myself,and that is what brought me to this thread.
I tried this after reading this thread,and it seems to work.
Give this a shot and see what you come up with.
Create a directory on your desktop for this experiment,and name it test.
Copy a few files and paste them into this directory so it isn't empty
Now open a terminal and enter:
cd Desktop <enter>
zip -e -r test test <enter>
enter a password <enter>
confirm password <enter>
You now have a zip file named test.zip with a password needed to open it.
It is still on your desktop,leave it there to finish this experiment.
Now su to root.
Enter ls /home/username/Desktop/test.zip
The result should be /home/username/Desktop/test.zip
That didn't say much about its contents.
Now enter cat /home/username/Desktop/test.zip
That should result in something like this:
Now copy the password protected zip file to a new temporary directory.Code:PK 8SO8 test/UT û®µGu±µGUxõõ¹~³Å`åÒ1ÌìPK PK 45O8¬_(þ¡test/(here it would list the contents of files but will not open the files themselves) passwordUT szµGW±µGUxõõʰ÷_iHѽº÷gµ´ý"6½3Þ(U?Q]zhRzÕ4Ý mp|ûî+V^PÌ8Î÷z|J©ÆÞNÊ>«yëlÚ9%ú'æ!R¼³<Íx3Àë▒y+ÕNòñ§¥ûãw!¸¼æe¥Ë Éõ 0¾ Øò5¹vÊøV2¹ãP¬_(þ¡PK 8SO8
Su to root in that directory,and enter this command
unzip -a <enter>
It will ask root for YOUR password.
Now log in as root.
Go to /home/username/Desktop/test.zip and open it.
All the files will be listed,but there should be an error when trying to open the files.
Now,still as root,try to open it with ark.
It will still ask root for the password.
Try the command unzip -a test.zip again.
C'mon Mr.Root.What's the password?
There probally is a way for root to actually open the password protected files,and I'd like to hear about it if there is.
And I don't mean for root to use a password cracker to do it!!!!
What I've mentioned so far,even root can't read the files without YOUR password.



