You are not logged in.

#1 2017-09-14 09:05:57

wangqr
Member
Registered: 2017-09-14
Posts: 2

[SOLVED] Installing on WSL, sudo does not work

I'm following the tutorial https://wiki.archlinux.org/index.php/Install_on_WSL to install arch on WSL. After installation, sudo does not work.

I'm using archlinux-bootstrap-2017.09.01-x86_64.tar.gz and glibc-wsl-2.26-3-x86_64.pkg.tar.xz, which are different from the version mentioned in the tutorial.

Running sudo gives the following output:

[wangqr@wangqr-w0 root]$ sudo true
sudo: getrlimit: Function not implemented
sudo: setrlimit: Function not implemented
[sudo] password for wangqr:
sudo: setrlimit: Function not implemented
sudo: pam_open_session: Critical error - immediate abort
sudo: policy plugin failed session initialization

The output of sudo --version:

[wangqr@wangqr-w0 root]$ sudo --version
Sudo version 1.8.21p2
Sudoers policy plugin version 1.8.21p2
Sudoers file grammar version 46
Sudoers I/O plugin version 1.8.21p2

I've only found this question from google, which is similar to my output. But I've checked that pacman -Qqk gives no output. find / -path /mnt -prune -o -name '*.pacnew' -print gives only /etc/pacman.d/mirrorlist.pacnew. I've also tried to uninstall WSL and restart from the beginning but has no difference. If I give root a password, I can su to root, but I prefer to use sudo if possible.

Does anyone have any suggestions on this problem?

Last edited by wangqr (2017-09-15 12:02:35)

Offline

#2 2017-09-14 15:03:07

pepper_chico
Member
Registered: 2016-04-19
Posts: 7

Re: [SOLVED] Installing on WSL, sudo does not work

I'm on the same boat after an upgrade, it was all fine before.

Offline

#3 2017-09-14 15:06:30

pepper_chico
Member
Registered: 2016-04-19
Posts: 7

Re: [SOLVED] Installing on WSL, sudo does not work

Enabling log for sudo I got this:

Sep 14 06:24:13 sudo[6454] -> sudo_auth_begin_session @ ./auth/sudo_auth.c:342
Sep 14 06:24:13 sudo[6454] -> sudo_pam_begin_session @ ./auth/pam.c:254
Sep 14 06:24:13 sudo[6454] -> log_warningx @ ./logging.c:549
Sep 14 06:24:13 sudo[6454] -> vlog_warning @ ./logging.c:434
Sep 14 06:24:13 sudo[6454] -> sudoers_setlocale @ ./locale.c:84
Sep 14 06:24:13 sudo[6454] sudoers_setlocale: setting locale to C (sudoers)
Sep 14 06:24:13 sudo[6454] <- sudoers_setlocale @ ./locale.c:125 := true
Sep 14 06:24:13 sudo[6454] pam_open_session: Critical error - immediate abort: No such file or directory
Sep 14 06:24:13 sudo[6454] -> new_logline @ ./logging.c:811
Sep 14 06:24:13 sudo[6454] <- new_logline @ ./logging.c:939 := pam_open_session: Critical error - immediate abort ; TTY=pts/2 ; PWD=/home/francisco ; USER=root ; COMMAND=/usr/bin/echo hi
Sep 14 06:24:13 sudo[6454] -> set_perms @ ./set_perms.c:110
Sep 14 06:24:13 sudo[6454] set_perms: PERM_ROOT: uid: [0, 0, 0] -> [0, 0, 0]
Sep 14 06:24:13 sudo[6454] set_perms: PERM_ROOT: gid: [0, 0, 0] -> [0, 0, 0]
Sep 14 06:24:13 sudo[6454] -> sudo_gidlist_addref @ ./pwutil.c:658
Sep 14 06:24:13 sudo[6454] <- sudo_gidlist_addref @ ./pwutil.c:660
Sep 14 06:24:13 sudo[6454] <- set_perms @ ./set_perms.c:384 := true
Sep 14 06:24:13 sudo[6454] -> do_syslog @ ./logging.c:96

Last edited by pepper_chico (2017-09-14 15:51:43)

Offline

#4 2017-09-14 15:13:25

fsckd
Forum Moderator
Registered: 2009-06-15
Posts: 4,058

Re: [SOLVED] Installing on WSL, sudo does not work

(Hi pepper_chico, please use code tags for terminal output. See the link somewhere near the bottom of this page called "BBCode".)


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#5 2017-09-15 12:03:03

wangqr
Member
Registered: 2017-09-14
Posts: 2

Re: [SOLVED] Installing on WSL, sudo does not work

glibc-wsl-2.26-4 has fixed this issue.

Offline

Board footer

Powered by FluxBB