Files
dotfiles/.local/bin/doas_askpass/README.md
2026-01-06 16:33:32 +01:00

1.8 KiB

Doas AskPass

Contents

Doas AskPass is a simple expect script that basically creates a sudo -A equivalent for Doas. This allows you to graphically enter your password.

Usage

`# user` doas-askpass <command>

Dependencies

  1. Doas
  2. Expect

Dmenu is also recommended.

Installation

Universal

`# user` git clone https://github.com/amarakon/doas_askpass
`# user` cd doas_askpass
`# root` make install

Gentoo

`# root` eselect repository add amarlay git https://github.com/amarakon/amarlay
`# root` emerge --sync amarlay
`# root` emerge app-admin/doas_askpass

Uninstallation

Universal

`# user` cd doas_askpass
`# root` make uninstall

Gentoo

`# root` emerge -c app-admin/doas_askpass
# Remove my overlay (optional)
`# root` eselect-repository remove -f amarlay
`# root` emerge --sync

Configuration

The graphical program that is expected by the script is set by the DOAS_ASKPASS environment variable. Otherwise, the default is dmenu -P -p password. You need the password patch in order for this to work. I recomment using my version which is more secure. You can set the environment variable in ~/.bashrc or anywhere else that your shell is going to source. The following is an example.

DOAS_ASKPASS="dmenu -P -p password:"