Skip to main content

Python version of linux sudo command without password prompt

Project description

Pudo Package

This is an Python Package for running Linux commands with root permission. We can see this as an alternative to Linux sudo command without password prompt. This is very handy when you are writing python automation scripts and need to deal with root privileges. You can use this as an python module or an Linux command.

Before using the pudo, please accept the Disclaimer:

user$ sudo pudo --accept-disclamer
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

	#1) Respect the privacy of others.
	#2) Think before you type.
	#3) With great power comes great responsibility.

PLEASE NOTE:
	Pudo Developers are not responsible for any misuse of Root Privileges

Thank You for Accepting the Disclaimer:
    It is great quality of you to respect other's privacy

Below is the code snippet for using in python automation for running commands under root privilege:

user$ python3 # or python2
>>> import pudo
>>> (ret, out) = pudo.run(('ls', '/root')) # or pudo.run('ls /root')
>>> print(ret)
0
>>> print(out)
b'Desktop\nDownloads\nPictures\nMusic\n'

Below is the cmd example for running commands under root privilege:

user$ pudo ls /root
Desktop  Downloads  Pictures  Music

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pudo-1.2.0.tar.gz (3.5 kB view details)

Uploaded Source

File details

Details for the file pudo-1.2.0.tar.gz.

File metadata

  • Download URL: pudo-1.2.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.28.0 rfc3986/1.5.0 tqdm/4.57.0 urllib3/1.26.9 CPython/3.10.4

File hashes

Hashes for pudo-1.2.0.tar.gz
Algorithm Hash digest
SHA256 b07eebe723bf2fd3bd2762a54f124ddd1bcc90578f23f67174d4dce42177542f
MD5 edf597abec7b591b348e0b1ff56b5d0e
BLAKE2b-256 2f2ab45e5584d943db3b95c0347737120c97f942f9d1c3b9be41520cb3d0fcd1

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page