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.3.0.tar.gz (4.2 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: pudo-1.3.0.tar.gz
  • Upload date:
  • Size: 4.2 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.3.0.tar.gz
Algorithm Hash digest
SHA256 b1789eedfe31bfd3b644f8198841bf61d55249db1842418aa23ff3ca7094dd80
MD5 70f66f9acd5ba442a023bf7fb481a62e
BLAKE2b-256 6ee62249c59bfff814eff1cc905ca633997d861623ac58b714f1f204209243f6

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