Skip to content

A sudo plugin providing a final chance for confirmation before actually executing a command

License

Notifications You must be signed in to change notification settings

e792a8/sudo_confirm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sudo_confirm

This sudo plugin gives you a final chance to check the actual command
before executing it.


INSTALL

Run:

    make

If everything goes well, there should be a sudo_confirm.so in this directory.
Copy it into /usr/lib/sudo/. Then you should add a line into /etc/sudo.conf
to enable this plugin:

    Plugin sudo_confirm sudo_confirm.so

You may need to create /etc/sudo.conf if it does not already exist.


CONFIGURE

If you dislike typing a 'y' each time, add a 'yes' at the end of the Plugin
line in sudo.conf like this:

    Plugin sudo_confirm sudo_confirm.so yes

If you even dislike typing Enter once more, add a 'noconfirm' at the end of
the Plugin line:

    Plugin sudo_confirm sudo_confirm.so noconfirm


Q: Why I need this?

    LAZY: I am lazy;
    PRIV: I do not want my password stolen by someone at my back while typing;
    NOPW: I have NOPASSWD;
    MANL: I manually invoke sudo;
    CHEK: I check every program line by line before executing it;
    AWAR: I am aware of every sudo invokation;
    IMPL: A program implicitly invokes sudo;
    MALW: A program is a malware;
    HAPY: I feel happy;
    SICK: I feel sick;
    DNGR: I am in danger;
    CFRM: I use sudo_confirm.

     LAZY +  PRIV         =  NOPW
    !NOPW +  LAZY         = !PRIV +  SICK
     MANL +  NOPW         =  HAPY
     NOPW +  IMPL         = !AWAR
     IMPL + !AWAR         =  SICK
     MALW +  CHEK         = !DNGR +  SICK
     MALW +  IMPL + !AWAR =  DNGR
     CFRM                 =  AWAR
     AWAR +  NOPW         = !DNGR +  HAPY

About

A sudo plugin providing a final chance for confirmation before actually executing a command

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published