Live data from Hacker News

Private Home Directories for Ubuntu 21.04

ubuntu.com

61–70 of 100 posts

Re: Private Home Directories for Ubuntu 21.04

#61
post #40

Earlier quoted context omitted.

The number of bash history files with accidental passwords pasted into them is quite high. Another reason I don’t sudo and instead ssh

Shell history files for admin accounts should be disabled (or at least kept short) for this reason.

But I really really like shell history files if I have to come behind someone!

Re: Private Home Directories for Ubuntu 21.04

#62
post #48

To me, user accounts have always seemed like the more reasonable approach to sandboxing vs. cloning the universe to run a single program in a container. Most of my systems have a user for myself, and one or two other users like `sketchy` or `test` or something for programs that I trust enough to run, but don't trust enough to not fuck up my home directory in some way (including modifying startup scripts, which IMHO s…

I run such less trusted programs on other machines. The privilege elevation attack surface is just too big on a normal Linux system.

That's why I think intra-user isolation is better. I would feel so much better if my browser could just access its settings, the download directory, and read access outside my home directory (for libs and such).

Re: Private Home Directories for Ubuntu 21.04

#63

I remember a while ago, Ubuntu used encryptfs for home directories, but it was removed. Weird, because I thought it was a great idea

Around 16.04 if you enabled encryption during installation, you got ecryptfs home directories - later (18.04?) they changed to encrypting the entire disk.

In some ways, encrypting the entire disk is more secure.

Re: Private Home Directories for Ubuntu 21.04

#64

I remember a while ago, Ubuntu used encryptfs for home directories, but it was removed. Weird, because I thought it was a great idea

On Ubuntu, you probably want zfs native encryption - either full disk, or per user:

https://talldanestale.dk/2020/04/06/zfs-and-homedir-encrypti...

Hope general zfs support will improve in the installer, though. As well as automation and tooling around automatic snapshots.

Re: Private Home Directories for Ubuntu 21.04

#66
post #62
post #48

To me, user accounts have always seemed like the more reasonable approach to sandboxing vs. cloning the universe to run a single program in a container. Most of my systems have a user for myself, and one or two other users like `sketchy` or `test` or something for programs that I trust enough to run, but don't trust enough to not fuck up my home directory in some way (including modifying startup scripts, which IMHO s…

I run such less trusted programs on other machines . The privilege elevation attack surface is just too big on a normal Linux system. That's why I think intra-user isolation is better. I would feel so much better if my browser could just access its settings, the download directory, and read access outside my home directory (for libs and such).

Isn't SELinux supposed to provide exactly this functionality?

The tricky part are the profiles afaik. But this could be solved with some concentrated community effort I guess.

I think AppArmor does something similar (I don't know the differences to SELinux in detail, so if someone like to clarify please go ahead). I remember I've seen some AppArmor related stuff regarding Firefox (and LibreOffice I think) in Ubuntu. So seems not much is missing to have at least an sandboxed web browser out-of-the-box on a Linux desktop.

Re: Private Home Directories for Ubuntu 21.04

#67
post #62
post #48

To me, user accounts have always seemed like the more reasonable approach to sandboxing vs. cloning the universe to run a single program in a container. Most of my systems have a user for myself, and one or two other users like `sketchy` or `test` or something for programs that I trust enough to run, but don't trust enough to not fuck up my home directory in some way (including modifying startup scripts, which IMHO s…

I run such less trusted programs on other machines . The privilege elevation attack surface is just too big on a normal Linux system. That's why I think intra-user isolation is better. I would feel so much better if my browser could just access its settings, the download directory, and read access outside my home directory (for libs and such).

> I run such less trusted programs on other machines.

You could probably use Qubes OS instead.

Re: Private Home Directories for Ubuntu 21.04

#68
post #44

Earlier quoted context omitted.

That's a shame. Honestly though, full-disk is just so darn easy, and nearly as secure. I'll probably just stick with that for a good long while. EDIT: Looks like LUKS is supported now, which is nice: https://wiki.archlinux.org/index.php/Systemd-homed#LUKS_home...

Full disk encryption is more secure. If you can't trust your system files who knows whats happening when you enter your password.

Isn’t Secure Boot supposed to solve that issue?

Re: Private Home Directories for Ubuntu 21.04

#69
post #62
post #48

To me, user accounts have always seemed like the more reasonable approach to sandboxing vs. cloning the universe to run a single program in a container. Most of my systems have a user for myself, and one or two other users like `sketchy` or `test` or something for programs that I trust enough to run, but don't trust enough to not fuck up my home directory in some way (including modifying startup scripts, which IMHO s…

I run such less trusted programs on other machines . The privilege elevation attack surface is just too big on a normal Linux system. That's why I think intra-user isolation is better. I would feel so much better if my browser could just access its settings, the download directory, and read access outside my home directory (for libs and such).

> I would feel so much better if my browser could just access its settings, the download directory, and read access outside my home directory (for libs and such).

I regularly have to both download files to other directories than my Download folder and upload files from other directories, such a restriction would break a lot of existing use cases.

The optimal way to achieve this would be to have the file / save picker a completely separate process, which then passes a token to the browser, which the browser then exchanges at some sort of "broker" process that returns a handle to the file.

Re: Private Home Directories for Ubuntu 21.04

#70
post #14

Isn’t this what Windows has done by default for a while now? Every user’s home directory is private to that user.

It is in fact an simple change to UMASK in /etc/login.defs. The default value is different between various Linux distributions and in fact Unix systems as a whole depending on the "pedigree". On the multiuser systems the default tends to be 022 (ie. 755 permission bits => read and execute to everyone), on "internet server" systems 033 (ie. execute to everyone, such that finger and http://foo.bar/~quux/ works) and 077…

Well that supposition can be checked easily...

    $ dpkg -S /etc/login.defs 
    login: /etc/login.defs
https://packages.ubuntu.com/login -> hirsuite -> changelog gets you to https://changelogs.ubuntu.com/changelogs/pool/main/s/shadow/... where you can see this is an ubuntu-specific patch introduced in version 1:4.8.1-1ubuntu8
Post reply on HN