Comments (9)
I have worked out a more user-friendly fix in this branch. It requires let g:suda#try_no_text_input_auth = 1
and has a configurable prompt message. This fix is based on PR #35, and I haven't documented the config options I added yet, but I think the fix should work.
from suda.vim.
I use fprintd
with sudo
and I also have this problem. According to the discussions in #34 i guess it is very hard to determine whether sudo
requests a password, so an extra configuration option may be the easiest way to solve this.
from suda.vim.
an extra configuration option may be the easiest way to solve this.
That would partially work. If my yubikey is not plugged it, sudo
falls back to asking for a password, so that scenario would not work. I guess if a fingerprint reader is built into the keyboard that wouldn't be an issue in that case though.
from suda.vim.
an extra configuration option may be the easiest way to solve this.
That would partially work. If my yubikey is not plugged it,
sudo
falls back to asking for a password, so that scenario would not work. I guess if a fingerprint reader is built into the keyboard that wouldn't be an issue in that case though.
Oh, then maybe another option is to make sudo
read from an empty stdin first. Changing -n
to -S
in this line should be enough. When stdin is empty, sudo
will fail to read a password and exit directly, while authentication methods that come before password can still work. (Unlike -n
which also suppresses other stuff like fingerprint authentication.)
I'm not familiar with YubiKey. When using fprintd
the solution above causes the editor to freeze until a fingerprint is scanned, so such a solution works, but is not user-friendly.
from suda.vim.
I'm working on a more user-friendly fix in this branch. It requires
let g:suda#try_no_text_input_auth = 1
and has a configurable prompt message. This fix is based on PR #35, and I haven't documented the config options I added yet, but I think the fix should work.
I tested the fix with fprintd
. SudaWrite
works fine, but when using SudaRead
spam is written to the temporary file by pam_fprintd.so
. Using dd
instead of cat
in suda#read()
may solve this only when assuming root
can write to temporary files created by Vim/Neovim. I'm not sure whether it is safe to make this assumption.
from suda.vim.
Another option may be to allow using an external terminal emulator or tmux
to run sudo
, so that the plugin doesn't need to care about what sudo
expects at all.
from suda.vim.
Actually, even using a new split with a terminal that does the sudo
might be a good idea.
It'd also improve the experience with failed password attempts.
from suda.vim.
This is an issue when using howdy as well, as you generally want sudo to automatically authenticate without asking for the password.
from suda.vim.
Any updates on this? I also use fprintd and when saving via Suda it prompts for the password first, then attempts to authenticate via the fingerprint sensor, and ultimately doesn't even save the file.
from suda.vim.
Related Issues (20)
- suda_smart_edit too slow HOT 9
- How do I use this? HOT 1
- vimdiff does not work with suda.vim HOT 2
- Cannot retry inputting password HOT 6
- support :saveas HOT 1
- doas support? HOT 14
- suda doesn't work in nvim in nixos HOT 4
- Prompt to re-read file after SudaWrite HOT 2
- lost suda#prefix option HOT 1
- [suda] dd: failed to open 'suda:///etc/i3blocks.conf': No Such file or directory HOT 1
- SudaWrite failure based on cwd? HOT 15
- Problem with -p flag HOT 2
- How do I install this? HOT 1
- Duplicate buffers with smart edit HOT 4
- neovim lsp jump to definition throws error on readonly files when using suda_smart_edit HOT 3
- When sudo is configured to ask for a fingerprint, suda halts for a long time HOT 1
- suda does not work when `sudo` command is aliased to something else HOT 3
- How can I set this variable in nvim lua? HOT 11
- Cannot activate suda_smart_edit HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from suda.vim.