Hacker News new | ask | show | jobs
by NoGravitas 3535 days ago
We're not on Windows 10 yet at my workplace, and I don't use Windows at home, so I've only been following loosely in a "this will be nice once I'm finally able to use it" way. But this bit took me by surprise:

> 1 Use the same working directory as the CMD or PowerShell prompt > 2 Are run under as the WSL default user > 3 Have the same Windows administrative rights as the calling process and terminal

1 and 3 are not surprising. But 2? There's a WSL default user? Windows users aren't automatically mapped to unique Linux users? That seems problematic in theory. How does it work out in practice?

2 comments

It seems to work pretty well in practice. The entire Ubuntu "system" is essentially installed into a Windows User's home space, which means that all of the Linux users are unique to a Windows user. This is useful in that you can install things that need Linux accounts for services (like say postgresql that uses a postgres user as a service account) and interact with it with sudo -u just as you would on an ordinary Ubuntu machine. With the interesting bit that the postgres user under my Windows user login would be different from the one under a different Windows user on the same machine, but that also has some advantages.
Thanks. That is a helpful explanation.
Every Windows user get a separate Linux.

When they run bash for the first time, system asks them to create a default linux user. Typically, this is also the only user.

Mapping Linux users to Windows users would be quite problematic, e. g. with user such as nobody or apache that are typical to Linux.

Solved problem, see Samba