Is there a way to create a user in the new Windows 10 implementation of bash so that I'm not running it as root, without having to create a different user account in the Windows 10 system? I want to use Windows as an administrator with my normal user account but when I launch bash I want it to launch into an account other than the default account, which I'm guessing is automatically root (in the Linux subsystem) since it's the administrator account (in the Windows system).
To access the shell, simply type 'bash' in the Windows command prompt, and everything is good to go.
sudo (superuser do) allows you to configure non-root users to run root level commands without being root. Access can be given by the root level administrator through configuration of the /etc/sudoers file.
Get Bash In Windows 10 After you turn it on, open the Control Panel app and go to Programs>Turn Windows Features On or Off. Select Windows Subsystem for Linux. Open Command Prompt (with admin rights) and type Bash. Windows 10 will download and install Bash.
What to Know. Developer Mode: Right-click Start menu > select Settings > Update & Security > For developers. Next: Select Developer mode > Yes > enable Windows Subsystem For Linux > restart. Use bash: Right-click Start menu > select Windows PowerShell (Admin) > type "bash" > press Enter.
WSL is specially designed not to compromise the normal Windows security, and it is (currently) "client-only". Thus, the "root" inside a WSL session is just simulation to make things look more real for stuff you run in the "Linux" environment. From the Windows point of view, root in WSL is the same user which launched the WSL. If this user is an elevated admin, the WSL programs are too.
For details, see the few available Channel9 videos and WSL blog.
To the original question - how to "drop" admin privileges for running WSL, see for example here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With