Skip to content

Able to access with root user without sudo. #2175

Closed

Description

@fthomasella

Environment

Microsoft Windows [Version 10.0.18362.239]
Windows Terminal (Preview)
Version: 0.2.1831.0

Ubuntu 18.04 LTS
Linux 4.4.0-18362-Microsoft #1-Microsoft Mon Mar 18 12:02:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux

Steps to reproduce

1- Install "Windows Subsystem for Linux"
2- Install any Linux distro, in this case I use Ubuntu 18.04 LTS
3-Open "Windows Terminal (Preview), with Windows Terminal go to the terminal droplist and choose "Ubuntu-18.04" it will open Ubuntu with root user as default.

The issue occuer because I don't finished the initial setup after install ubuntu (create a user, ,setup user passwd, setup a root password e.g..)

After doing the initial setup the problem as solved and "Windows Terminal (Preview)" open with my user and ask for password when I try to became root.

As sugestion, ask the initial setup in "Windows Terminal (Preview)", the same way you already do in cmd/bash.

Activity

  1. ghost added
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    on Jul 31, 2019
  2. ghost added
    Needs-Tag-FixDoesn't match tag requirements
    on Jul 31, 2019
  3. changed the title [-]Abble to access with root user without sudo.[/-] [+]Able to access with root user without sudo.[/+] on Jul 31, 2019
  4. zadjii-msft commented on Jul 31, 2019

    @zadjii-msft
    Member

    Huh. Not sure how we'd be able to fix that.

    When we're setting up the default linux profiles, we're setting them up with the commandline wsl.exe -d <distroname>. That means we're skipping the app's install process entirely, and just asking wsl to launch that distro. The app's executable (ubuntu.exe) is the actual exe respo;nsible for the install process, wsl.exe doesn't know anything about it. In fact, the app might not even have an initial setup step. I'm also fairly certain there's no stable distro <-> executable mapping that we can rely on, which is why we're using wsl to launch the distro instead of ubuntu

    Summoning Ben Hillis (@benhillis) who might have some ideas here, but I'm not certain there's much we can do about this.

  5. DHowett-MSFT commented on Aug 1, 2019

    @DHowett-MSFT
    Contributor

    The problem is, though, that the distribution is not registered until you've run ubuntu.exe or whatever.exe. Once you have run it, it is fair game. This torn state can happen even if you use wsl.exe -d <distro> directly.

    In fact, if you run ubuntu.exe, stop in the middle of setup, and then run ubuntu.exe AGAIN you will log in as root.

    The customization steps are fully dictated by the distribution's installer author. If you abort in the middle of them, you are inviting all sorts of unusual behavior. This isn't something the terminal can fix, and this also isn't something WSL can fix.

  6. added
    Resolution-By-DesignIt's supposed to be this way. Sometimes for compatibility reasons.
    Resolution-AnsweredRelated to questions that have been answered
    and removed
    Needs-TriageIt's a new issue that the core contributor team needs to triage at the next triage meeting
    Resolution-By-DesignIt's supposed to be this way. Sometimes for compatibility reasons.
    on Aug 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-QuestionFor questions or discussionNeeds-Tag-FixDoesn't match tag requirementsProduct-WSLIssue that should probably go to Microsoft/WSLResolution-AnsweredRelated to questions that have been answered

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions