Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asking for sudo password upon login #427

Open
kronikpillow opened this issue Mar 27, 2021 · 5 comments
Open

asking for sudo password upon login #427

kronikpillow opened this issue Mar 27, 2021 · 5 comments

Comments

@kronikpillow
Copy link

kronikpillow commented Mar 27, 2021

zimfw version: 1.4.3 (built at 2021-03-19 23:42:38 UTC, previous commit is 163d36b)
ZIM_HOME:      /home/kronikpillow/.config/zsh/.zim
Zsh version:   5.8
System info:   Linux susanoo 5.11.9-2-ck-ivybridge #1 SMP PREEMPT Wed, 24 Mar 2021 21:34:40 +0000 x86_64 GNU/Linux

my .zimrc .zshenv .zprofile and .zshrc

Description

I used to use luke smiths larbs, and have some of his dotfiles as default for my own dotfiles now, recently i decided to see how far zimfw has gone with changes and to test out the latest version, after installing it, i am getting prompted for my sudo password right after login, even when connecting from a different machine ... this does not happen when i uninstall zim and switch back to my standard .zprofile and .zshenv which is not much different from what it is now .. (only difference being the .zshrc it self and having ZIM HOME variable in zshenv

ssh kronikpillow@susanoo -p 2222 kronikpillow@susanoo's password: Last login: Sat Mar 27 08:39:31 2021 from 93.87.123.179 [sudo] password for kronikpillow:

checkout my .zshenv .zprofile .zinitrc and .zshrc please and tell me what could be causing this?

@ericbn
Copy link
Member

ericbn commented Mar 27, 2021

I see this on your zprofile:

sudo -n loadkeys ${XDG_DATA_HOME:-$HOME/.local/share}/larbs/ttymaps.kmap 2>/dev/null

And there's much more going on in your startup files than just setting up Zim, so it could be any other thing...

@kronikpillow
Copy link
Author

kronikpillow commented Mar 27, 2021

yeah i figure it's the loadkeys function, but loadkeys is set in /etc/sudoers to run without password, while at the same time that command didn't create any issues until i switched to zim itself, so im wondering how to debug what is causing the sudo password prompt to appear for sure? I mean why is zimfw triggering it, while zsh without it isn't ... it was a identical setup, i even merged my original .zshrc which was actually luke smith's zshrc

as i understand sudo -n means non interactive, it shouldn't be triggering a password prompt ... is zsh for some reason ignoring the -n switch?

@kronikpillow
Copy link
Author

investigating further, I have made a commit disabling loadkeys, still a sudo login prompt upon login :-/

@kronikpillow
Copy link
Author

kronikpillow commented Mar 27, 2021

ok ... narrowed it down to [ ! -f ${XDG_CONFIG_HOME:-$HOME/.config}/shell/shortcutrc ] && shortcuts >/dev/null 2>&1 & ... which i find strange ... here is shortcuts script ... can someone help me figure this out please? I know it's probably a pita and a newbie situation, but this same setup works without zimfw so I naturally came for help here first :) or point me in the right direction? thanks 😄😄

@kronikpillow
Copy link
Author

ok i was wrong ... it wasn't that command ... i have went one by one in my .zshenv and .zprofile and enabled disabled stuff ... then i'v gone to my xinitrc xprofile and enabled disabled stuff there ... what changed was that on my display sometimes it asked for the sudo password some times it didn't (im assuming it cached the previous sudo password input and didn't ask for it every time) ... but every time i ssh in to my machine, it keeps asking for my sudo password on login ... then i uninstalled zimfw, and reverted to my default .zshrc and problem is completely gone, on login and on ssh login ...

now i'm going to reinstall zimfw and see what happens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants