[opensuse] How do I know that a dir really is encrypted?
Hello, I installed a user and gave him an encrypted home directory with Yast. But how can I be sure the contents of that directory is really encrypted? When I look at this users directory using konqueror *as another user* (and also as root) it shows up just as any directory, I can read all files for example in "public html", I see all sub-directories... I thought it's only decrypted after loging in as this user and only for this user, but I can see the contents as any user even after a reboot and without ever loging in as that "encrypted user". Is this normal behaviour? I thought, the contents will only be decrypted when this user logs in and only for him. But as it is, any user can see everything, so whats this encryption useful for? Or did I again miss something essential? Thanks for helping me. Daniel -- Daniel Bauer photographer Basel Switzerland professional photography: http://www.daniel-bauer.com erotic art photos: http://www.bauer-nudes.com/en/linux.html Madagascar special: http://www.fotograf-basel.ch/madagascar/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Daniel Bauer a écrit :
everything, so whats this encryption useful for?
try to boot with a live cd and see if you can read jdd -- Jean-Daniel Dodin Président du CULTe www.culte.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wednesday 23 April 2008 20.38:05, jdd sur free wrote:
Daniel Bauer a écrit :
everything, so whats this encryption useful for?
try to boot with a live cd and see if you can read
jdd
Havn't tried that, but: This laptop will not only be used by me. Every person that may use it has it's user name and user home dir, of course. But if you can log in as any user and then see the "encrypted" files of another user in clear text, well, then this is not what I expect from "encryption" and I could simply give restrictive rights to those dirs. I simply don't want that other users can read the "encripted" home dir of another user, this is why I want to encrypt it. I want the ecrypted dir to stay encrypted for everybody except for the user to which the dir belongs. This is what I thought that encryption was made for. Is that not possible? Daniel -- Daniel Bauer photographer Basel Switzerland professional photography: http://www.daniel-bauer.com erotic art photos: http://www.bauer-nudes.com/en/linux.html Madagascar special: http://www.fotograf-basel.ch/madagascar/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Daniel Bauer wrote:
On Wednesday 23 April 2008 20.38:05, jdd sur free wrote:
Daniel Bauer a écrit :
everything, so whats this encryption useful for?
try to boot with a live cd and see if you can read
jdd
Havn't tried that, but:
This laptop will not only be used by me. Every person that may use it has it's user name and user home dir, of course. But if you can log in as any user and then see the "encrypted" files of another user in clear text, well, then this is not what I expect from "encryption" and I could simply give restrictive rights to those dirs.
I simply don't want that other users can read the "encripted" home dir of another user, this is why I want to encrypt it.
I want the ecrypted dir to stay encrypted for everybody except for the user to which the dir belongs. This is what I thought that encryption was made for.
Is that not possible?
Daniel
While I haven't tried it with a /home directory, I have encrypted a flash drive. Whenever I try to mount it, I'm asked for the password. I seem to recall an article in Linux Journal, a while ago, about encryted /home directories. -- Use OpenOffice.org http://www.openoffice.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
James Knott wrote:
Daniel Bauer wrote:
On Wednesday 23 April 2008 20.38:05, jdd sur free wrote:
Daniel Bauer a écrit :
everything, so whats this encryption useful for?
try to boot with a live cd and see if you can read
jdd
Havn't tried that, but:
This laptop will not only be used by me. Every person that may use it has it's user name and user home dir, of course. But if you can log in as any user and then see the "encrypted" files of another user in clear text, well, then this is not what I expect from "encryption" and I could simply give restrictive rights to those dirs. I simply don't want that other users can read the "encripted" home dir of another user, this is why I want to encrypt it.
I want the ecrypted dir to stay encrypted for everybody except for the user to which the dir belongs. This is what I thought that encryption was made for. Is that not possible?
Daniel
While I haven't tried it with a /home directory, I have encrypted a flash drive. Whenever I try to mount it, I'm asked for the password. I seem to recall an article in Linux Journal, a while ago, about encryted /home directories.
Here's the link: http://www.linuxjournal.com/article/8599 -- Use OpenOffice.org http://www.openoffice.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
James Knott wrote:
James Knott wrote:
Daniel Bauer wrote:
On Wednesday 23 April 2008 20.38:05, jdd sur free wrote:
Daniel Bauer a écrit :
everything, so whats this encryption useful for?
try to boot with a live cd and see if you can read
jdd
Havn't tried that, but:
This laptop will not only be used by me. Every person that may use it has it's user name and user home dir, of course. But if you can log in as any user and then see the "encrypted" files of another user in clear text, well, then this is not what I expect from "encryption" and I could simply give restrictive rights to those dirs. I simply don't want that other users can read the "encripted" home dir of another user, this is why I want to encrypt it.
I want the ecrypted dir to stay encrypted for everybody except for the user to which the dir belongs. This is what I thought that encryption was made for. Is that not possible?
Daniel
While I haven't tried it with a /home directory, I have encrypted a flash drive. Whenever I try to mount it, I'm asked for the password. I seem to recall an article in Linux Journal, a while ago, about encryted /home directories.
Here's the link: http://www.linuxjournal.com/article/8599
Further on this. Much of what's described in that article appears to be already included in openSUSE 10.3. -- Use OpenOffice.org http://www.openoffice.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wednesday 2008-04-23 21:08, James Knott wrote:
I simply don't want that other users can read the "encripted" home dir of another user, this is why I want to encrypt it.
I want the ecrypted dir to stay encrypted for everybody except for the user to which the dir belongs. This is what I thought that encryption was made for.
Is that not possible?
pam_mount with encfs provides the next-best match for that. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Am Mittwoch, 23. April 2008 schrieb Daniel Bauer:
[...] I thought it's only decrypted after loging in as this user and only for this user, but I can see the contents as any user even after a reboot and without ever loging in as that "encrypted user". [...] Or did I again miss something essential?
I think so. As you come from Switzerland I assume that you speak German (your nice web page tells me this, too). So, please have a look at this thread on opensuse-de: http://lists.opensuse.org/opensuse-de/2008-04/msg00751.html In summary, the trick is if you give an existing user an encrypted home directory, YaST will copy the current home to the encrypted one. At first glance, it might look like you can see the content of the encrypted home. But in fact, this is the old content. Thus, this state will survive a reboot. If you add new files as the user owning the encrypted home logged in, you will not see them if the user is not logged in. However, it might be possible that the encrypted home cannot be unmounted correctly, check the output of "mount" whether it still contains a line starting with "/dev/mapper/_dev_loop0 on /home/..." after the user has logged out. This line must be present as long as the user is logged in, but not any longer. HTH Jan -- Beware of programmers who carry screwdrivers. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wednesday 23 April 2008 21.15:54, Jan Ritzerfeld wrote:
Am Mittwoch, 23. April 2008 schrieb Daniel Bauer:
[...] I thought it's only decrypted after loging in as this user and only for this user, but I can see the contents as any user even after a reboot and without ever loging in as that "encrypted user". [...] Or did I again miss something essential?
Thank you Jan, you've put some light "on my disk" :-)
I think so. As you come from Switzerland I assume that you speak German (your nice web page tells me this, too). So, please have a look at this thread on opensuse-de: http://lists.opensuse.org/opensuse-de/2008-04/msg00751.html
In summary, the trick is if you give an existing user an encrypted home directory, YaST will copy the current home to the encrypted one. At first glance, it might look like you can see the content of the encrypted home. But in fact, this is the old content. Thus, this state will survive a reboot.
This is what obviously really confused me: there was no "old content" (I added a new user and directly gave him the encrypted home-directory in Yast). After reading your post I opened konqueror as root (without logging in as "encrypted user") and renamed some of those files to *.OLD. Then opened an additional session for the "encrypted user" and: the *.OLD files were *not* there... Switched back to normal user, reloaded directory in Konqueror - and the *.OLD files were gone, too. Terminated the "encrypted" session, reloaded Konq - and the *.OLD files were there again... Finally deleted all these files. Opened a new "encrypted user" session, added some large files, terminated the session - and guess what: I cannot see those files in Konq as another user or root anymore, the home directory of the "encrypted user" now just appears empty. Wow, this is exactly what I wanted... So, I guess, when adding a new user in Yast with an encrypted home dir, Yast first creates the normal, unencrypted new home dir, then the .img-file etc., copies the unencrypted home dir to the .img file and leaves the now unused unencrypted dir and it's content as is, although it is not of use anymore. For a not so linux savy user this is very confusing and I think, it should be mentioned in the help text on the left in Yast or at least in the explanations on the opensuse pages...
If you add new files as the user owning the encrypted home logged in, you will not see them if the user is not logged in.
Now I see that it really is so. Du to the "double-existence" of some dirs and files it appeared contrary. Like a Fata Morgana.
However, it might be possible that the encrypted home cannot be unmounted correctly, check the output of "mount" whether it still contains a line starting with "/dev/mapper/_dev_loop0 on /home/..." after the user has logged out. This line must be present as long as the user is logged in, but not any longer.
Yes, it does all correctly: logged in mount shows "/dev/mapper/...", logged out, "/dev/mapper/..." disappears. Great :-)
HTH Jan
Thanks. Daniel -- Daniel Bauer photographer Basel Switzerland professional photography: http://www.daniel-bauer.com erotic art photos: http://www.bauer-nudes.com/en/linux.html Madagascar special: http://www.fotograf-basel.ch/madagascar/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
----- Original Message -----
From: "Daniel Bauer"
On Wednesday 23 April 2008 21.15:54, Jan Ritzerfeld wrote:
Am Mittwoch, 23. April 2008 schrieb Daniel Bauer:
[...] I thought it's only decrypted after loging in as this user and only for this user, but I can see the contents as any user even after a reboot and without ever loging in as that "encrypted user". [...] Or did I again miss something essential?
Thank you Jan, you've put some light "on my disk" :-)
I think so. As you come from Switzerland I assume that you speak German (your nice web page tells me this, too). So, please have a look at this thread on opensuse-de: http://lists.opensuse.org/opensuse-de/2008-04/msg00751.html
In summary, the trick is if you give an existing user an encrypted home directory, YaST will copy the current home to the encrypted one. At first glance, it might look like you can see the content of the encrypted home. But in fact, this is the old content. Thus, this state will survive a reboot.
This is what obviously really confused me:
there was no "old content" (I added a new user and directly gave him the encrypted home-directory in Yast).
After reading your post I opened konqueror as root (without logging in as "encrypted user") and renamed some of those files to *.OLD. Then opened an additional session for the "encrypted user" and: the *.OLD files were *not* there... Switched back to normal user, reloaded directory in Konqueror - and the *.OLD files were gone, too. Terminated the "encrypted" session, reloaded Konq - and the *.OLD files were there again...
Finally deleted all these files. Opened a new "encrypted user" session, added some large files, terminated the session - and guess what: I cannot see those files in Konq as another user or root anymore, the home directory of the "encrypted user" now just appears empty. Wow, this is exactly what I wanted...
So, I guess, when adding a new user in Yast with an encrypted home dir, Yast first creates the normal, unencrypted new home dir, then the .img-file etc., copies the unencrypted home dir to the .img file and leaves the now unused unencrypted dir and it's content as is, although it is not of use anymore.
For a not so linux savy user this is very confusing and I think, it should be mentioned in the help text on the left in Yast or at least in the explanations on the opensuse pages...
If you add new files as the user owning the encrypted home logged in, you will not see them if the user is not logged in.
Now I see that it really is so. Du to the "double-existence" of some dirs and files it appeared contrary. Like a Fata Morgana.
However, it might be possible that the encrypted home cannot be unmounted correctly, check the output of "mount" whether it still contains a line starting with "/dev/mapper/_dev_loop0 on /home/..." after the user has logged out. This line must be present as long as the user is logged in, but not any longer.
Yes, it does all correctly: logged in mount shows "/dev/mapper/...", logged out, "/dev/mapper/..." disappears. Great :-)
There is no special confusion that needs special mention anywhere. That is the normal operation on any and every mount point everywhere. The encrypted loop device mounts are no different. If it's confusing to someone, it just means they don't understand unix very well, not that there is anything special about this encrypted directory feature. A mount point is just a directory. Like any other directory, a mount point may have content in it before a filesystem is mounted over it. When the filesystem is mounted on a mount point, any existing content becomes invisible and inaccssible, and all you can see or access is the stuff in the mounted filsystem. Un-mount the filesystem and the content in the filesystem becomes inaccessible and the stuff in the underlying mount point becomes accessible again. This is basic to every kind of filesystem, every kind of disk or virtual disk, and every unix since the begining of time and if there is any special mention required, it would be the other way around, to mention that today there are a few recently invented bizarre magical new exceptions that do _not_ behave this way, such as unionfs. -- Brian K. White brian@aljex.com http://www.myspace.com/KEYofR +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++. filePro BBx Linux SCO FreeBSD #callahans Satriani Filk! -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 24 April 2008 09.48:30, Brian K. White wrote:
If it's confusing to someone, it just means they don't understand unix very well, not that there is anything special about this encrypted directory feature.
Right you are. But I guess, most of the users don't understand unix very well. And when offering "click-click"-tools like Yast (in contrary to command line tools for more experienced users) it would be nice to see some hints to avoid confusion. Just like "rm" in the command line doesn't give feedback, while konqueror by default asks you, if you really want to delete the file.
A mount point is just a directory. Like any other directory, a mount point may have content in it before a filesystem is mounted over it. When the filesystem is mounted on a mount point, any existing content becomes invisible and inaccssible, and all you can see or access is the stuff in the mounted filsystem.
Thank you for this explication. I didn't even know that you can mount a file system on a mountpoint that already has content, simply because I never tried that. I thought, the original content would be lost, if I mount something else over it... But now, knowing that, it looks far more logical to me, of course. regards Daniel -- Daniel Bauer photographer Basel Switzerland professional photography: http://www.daniel-bauer.com erotic art photos: http://www.bauer-nudes.com/en/linux.html Madagascar special: http://www.fotograf-basel.ch/madagascar/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (6)
-
Brian K. White
-
Daniel Bauer
-
James Knott
-
Jan Engelhardt
-
Jan Ritzerfeld
-
jdd sur free