yuk7 / ArchWSL

ArchLinux based WSL Distribution. Supports multiple install.
https://git.io/archwsl
MIT License
6.92k stars 201 forks source link

Default root pass? #49

Closed jkw closed 5 years ago

jkw commented 6 years ago

IMPORTANT Please read README and Known issues before creating the issue.

Please fill out the below information: Describe the issue Trying to change root password, to be able to add users to sudo.

To Reproduce Try to change root password with 'passwd'

Expected behavior Expected the password to be root, arch or similiar, but nothing helped.

Screenshots Can add if needed?

Enviroment: Microsoft Windows [Version 10.0.17744.1001]

Additional context Much of the help in template didn't really help at all....

ShayBox commented 6 years ago

There is no default root password, you can change it with passwd though

WSL Ver: You check the zip name you downloaded from github. Launcher Ver: You typed the wrong command for launcher version, Arch.exe version.

yuk7 commented 6 years ago

The problem could not be confirmed in my environment. Did you see any errors with passwd?

lgjmac commented 6 years ago

Never had a problem with password.. Close?

alxctc commented 6 years ago

I encountered this issue, following the instruction to set password, and the password was verified to be wrong. And, I used the latest version:18100800 on windows 10 1809. Reproduce : arch.exe console :

[root@WIN-XXXXXXXXXXX ~]# passwd New password:hello Retype new password:hello passwd: password updated successfully [root@WIN-XXXXXXXXXXX ~]# EDITOR=vim visudo %wheel ALL=(ALL) ALL (removed the "#" and saved) useradd -m -G wheel -s /bin/bash john

windows dos-prompt (admin) :

Arch.exe config --default-user john

arch.exe console :

[john@WIN-XXXXXXXXXXX ~]$ sudo pacman-key --init We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:

1) Respect the privacy of others.

2) Think before you type.

3) With great power comes great responsibility.

[sudo] password for john:hello Sorry, try again. [sudo] password for john:

Thank you for any help you can provide.

ShayBox commented 6 years ago

you set the password of root not john

yuk7 commented 6 years ago

I updated the wiki because there was a deficiency in the explanation...

Please set the default user password separately from the root password.

alxctc commented 6 years ago

I'm back and thanks for all the help from community.

I followed the new wiki, and created the password for both root and user, but still can't solve the issue. I tried to search about "wheel" and find the instruction here ( https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/2/html/Getting_Started_Guide/ch02s03.html ) can approve my user password,

The commands there are somewhat different, like : $ useradd USERNAME $ passwd USERNAME $ visudo %wheel ALL=(ALL) ALL (remove the "#") $ usermod -aG wheel USERNAME

Actually I tried yuk7 another project "wsldl" and build ubuntu 18.04, but add a line at /etc/sudoers (searched from internet), like this : (require to change file "sudoers" to be writable by "chmod u+w sudoers") root All=(ALL:ALL) ALL john ALL=(ALL:ALL) ALL (add this line only, john is username.) (save and make file sudoers return to be read-only by "chmod u-w sudoers")

Now I find both the builds of ubuntu and arch can run together. so I'm a happy user to learn arch linux things now.