diff options
author | Filipp Lepalaan <filipp@mac.com> | 2017-04-14 16:03:57 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2017-04-14 16:03:57 +0300 |
commit | a1406ed910d5b55081f969631e475717beaeac30 (patch) | |
tree | 50233c0063d1ef6169ec9c1e37001248292146d2 | |
parent | a418b8af81ec1653f35b864df41b54e1995c551a (diff) | |
download | machammer-a1406ed910d5b55081f969631e475717beaeac30.tar.gz machammer-a1406ed910d5b55081f969631e475717beaeac30.tar.bz2 machammer-a1406ed910d5b55081f969631e475717beaeac30.zip |
Added kamikaze example
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | README.md | 10 |
2 files changed, 11 insertions, 0 deletions
@@ -1 +1,2 @@ *.pyc +*.zip @@ -124,6 +124,16 @@ def sayhello(): sayhello() ``` +### Running with scissors + +An extreme example - say you have a Mac with nothing more than an admin account with ARD access and you want to create a new user account. Here's one way to do it using `machammer`: + +Remote Desktop > Send UNIX command (as root): + +``` +curl -o /tmp/machammer.zip http://machammer.org/machammer.zip && echo -e 'from machammer import users\nusers.create_user("John Appleseed", "supersecret")' | PYTHONPATH=/tmp/machammer.zip python +``` + ### system_profiler `machammer` includes `system_profiler` - a small wrapper around OS X's `system_profiler (1)` tool. It provides a simple API for accessing system profile information as well as caching to improve performance (especially when dealing with application profile data). |