HOME points to something not owned by user in sudo
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sudo (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
zsh (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
<CcxWrk> You shouldn't use interactive shell, or any program with executable configuration, while your HOME points to something not owned by your user. That's the big issue and it's with sudo, not zsh, not omz, not any other shell or application you launch. <CcxWrk> You can go shout "you are doing security wrong" at Ubuntu. Good luck.
╭─rkm@Khadas ~
╰─➤ id rkm && getent passwd rkm
uid=1001(rkm) gid=1001(rkm) groups=
rkm:x:1001:
╭─rkm@Khadas ~
╰─➤ sudo /usr/bin/env 1 ↵
LC_MESSAGES=
LANG=en_US.UTF-8
LANGUAGE=
TERM=xterm-256color
XAUTHORITY=
COLORTERM=truecolor
DISPLAY=:0.0
PATH=/usr/
HOME=/home/rkm
LC_CTYPE=
LS_COLORS=
MAIL=/var/mail/root
LOGNAME=root
USER=root
USERNAME=root
SHELL=/bin/bash
SUDO_COMMAND=
SUDO_USER=rkm
SUDO_UID=1001
SUDO_GID=1001
╭─rkm@Khadas ~
╰─➤
<Eickmeyer> CyberManifest: sudo is a package. Also, once filed, add zsh to the bug since it could be a bug in zsh's package as well.
<Eickmeyer> Not necessarily zsh itself, but the packaging.
ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: sudo 1.8.21p2-3ubuntu1
Uname: Linux 4.9.40 aarch64
ApportVersion: 2.20.9-0ubuntu7.6
Architecture: arm64
CurrentDesktop: XFCE
Date: Thu Apr 4 11:07:42 2019
SourcePackage: sudo
UpgradeStatus: No upgrade log present (probably fresh install)
VisudoCheck:
/etc/sudoers: parsed OK
/etc/sudoers.
This appears to be the missing context:
╭─rkm@Khadas ~ dependent directories detected: .oh-my- zsh .oh-my- zsh/plugins .oh-my- zsh/plugins/ git
╰─➤ sudo -s
[oh-my-zsh] Insecure completion-
drwxr-xr-x 11 rkm rkm 4096 Mar 30 19:19 /home/rkm/
drwxr-xr-x 266 rkm rkm 12288 Mar 30 19:19 /home/rkm/
drwxr-xr-x 2 rkm rkm 4096 Mar 30 19:19 /home/rkm/
[oh-my-zsh] For safety, we will not load completions from these directories until
[oh-my-zsh] you fix their permissions and ownership and restart zsh.
[oh-my-zsh] See the above list for directories with group or other writability.
[oh-my-zsh] To fix your permissions you can do so by disabling
[oh-my-zsh] the write permission of "group" and "others" and making sure that the
[oh-my-zsh] owner of these directories is either root or your current user.
[oh-my-zsh] The following command may help:
[oh-my-zsh] compaudit | xargs chmod g-w,o-w
[oh-my-zsh] If the above didn't help or you want to skip the verification of
[oh-my-zsh] insecure directories you can set the variable ZSH_DISABLE_COMPFIX to
[oh-my-zsh] "true" before oh-my-zsh is sourced in your zshrc file.
from http:// dpaste. com/1NQ618Y