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

Adding doas support. #505

Open
Scupake opened this issue Mar 3, 2021 · 10 comments · May be fixed by #766
Open

Adding doas support. #505

Scupake opened this issue Mar 3, 2021 · 10 comments · May be fixed by #766

Comments

@Scupake
Copy link

Scupake commented Mar 3, 2021

Can someone please add support for doas?

@scop
Copy link
Owner

scop commented Mar 6, 2021

Have you asked if upstream doas project would be interested int creating or maintaining one?

@Scupake
Copy link
Author

Scupake commented Mar 6, 2021

No, I haven't, I guess I could open an issue for OpenDoas, which is the version used in Void, Debian, Ubuntu and Gentoo.

@chunzu
Copy link

chunzu commented Apr 5, 2021

Can someone please add support for doas?

Just copy sudo file from completions directory and rename it to doas. Then search and replace all occurrences of sudo in this file with doas.
Wait for a proper solution :)

@fethomm
Copy link

fethomm commented Jun 13, 2021

That helps some, but not with completion for apt in Debian. Do you have an idea how to work around that?

@chunzu
Copy link

chunzu commented Jun 14, 2021

Hello. I'm on Debian as well. Completion for apt commands work fine.

This is my /etc/doas.conf:
permit keepenv nopass USER as root

Without "keepenv" you can't start GUI applications. But even with this, there are some errors about DBUS and others. So please do not launch GUIs as it can break your system.

Also on a second line of doas completion file, add this:
PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin

To fix "command not found" error for programs in /usr/sbin.

Sorry, I can not help you more than this. We have to wait when somebody implements it.

@fethomm
Copy link

fethomm commented Jun 15, 2021

Thanks, that helped!

@Scupake
Copy link
Author

Scupake commented Jul 20, 2021

Opendoas' maintainer has said in a reddit comment that they won't add any feature unless it is in upstream doas, which is unlikely to add bash support because iirc they use ksh on openbsd

@scop
Copy link
Owner

scop commented Sep 2, 2021

OpenBSD has bash-completion in their ports tree, https://openports.se/shells/bash-completion

@akinomyoga
Copy link
Collaborator

Ref. PR Duncaen/OpenDoas#84 in OpenDoas

@kzwkt
Copy link

kzwkt commented Feb 27, 2023

you can get completion by symlinking doas as sudo if you only use doas
example :
doas ln -s /usr/bin/doas $HOME/.local/bin/sudo

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

Successfully merging a pull request may close this issue.

6 participants