Skip to content

Tool for dropping root privileges before running a command

License

Notifications You must be signed in to change notification settings

lcosmin/dropprivs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dropprivs

Description

This is a very simple tool that can drop privileges of the root user and execute a command.

Usage

The user to switch to must be specified on the command line (-u). Use a double dash (--) to sepparate the parameters of droppriv from the command to be executed, as in the example below:

# dropprivs -u bin -d /tmp -- /bin/bash -c "pwd; id"
/tmp
uid=2(bin) gid=2(bin) groups=2(bin)

Building

$ cd source-dir
$ mkdir build && cd build
$ cmake ..
$ make

About

Tool for dropping root privileges before running a command

Resources

License

Stars

Watchers

Forks

Packages

No packages published