All Projects → cl-adams → Adams

cl-adams / Adams

Licence: other
UNIX system administration in Common Lisp

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Adams

Gitzone
git-based zone management tool for static and dynamic domains
Stars: ✭ 100 (-25.93%)
Mutual labels:  sysadmin, ssh
Sshmon
Manage and monitor SSH connections.
Stars: ✭ 152 (+12.59%)
Mutual labels:  sysadmin, ssh
Punk.py
unix SSH post-exploitation 1337 tool
Stars: ✭ 107 (-20.74%)
Mutual labels:  unix, ssh
Sshremotekeys
Managing SSH keys remotely to control access to hosts
Stars: ✭ 70 (-48.15%)
Mutual labels:  sysadmin, ssh
Awesome Terminal Commands
An awesome resource listing and explaining various commonly used *nix commands
Stars: ✭ 109 (-19.26%)
Mutual labels:  unix, ssh
Socket
Non-blocking socket and TLS functionality for PHP based on Amp.
Stars: ✭ 122 (-9.63%)
Mutual labels:  unix
Unix V6
UNIX 6th Edition Kernel Source Code
Stars: ✭ 125 (-7.41%)
Mutual labels:  unix
Plunder
A Modern automation platform
Stars: ✭ 121 (-10.37%)
Mutual labels:  ssh
Unix Stream
Turn Java 8 Streams into Unix like pipelines
Stars: ✭ 119 (-11.85%)
Mutual labels:  unix
Sshdeploy
A command-line tool that enables quick build and run deployments over SSH.
Stars: ✭ 131 (-2.96%)
Mutual labels:  ssh
Sshr
Proxy server for routing SSH connections
Stars: ✭ 129 (-4.44%)
Mutual labels:  ssh
Awesome Ssh
💻 A curated list of SSH resources.
Stars: ✭ 1,742 (+1190.37%)
Mutual labels:  ssh
Uftpd
FTP/TFTP server for Linux that just works™
Stars: ✭ 122 (-9.63%)
Mutual labels:  unix
Pssh
Parallel SSH Tools
Stars: ✭ 127 (-5.93%)
Mutual labels:  ssh
Lessmd
A small markdown viewer/converter for unix terminal.
Stars: ✭ 122 (-9.63%)
Mutual labels:  unix
Connectbot
ConnectBot is the first SSH client for Android.
Stars: ✭ 1,763 (+1205.93%)
Mutual labels:  ssh
Simple
The Simple Intelligent and Modular Programming Language and Environment
Stars: ✭ 120 (-11.11%)
Mutual labels:  unix
Sish
HTTP(S)/WS(S)/TCP Tunnels to localhost using only SSH.
Stars: ✭ 2,087 (+1445.93%)
Mutual labels:  ssh
Analogsea
Digital Ocean R client
Stars: ✭ 128 (-5.19%)
Mutual labels:  ssh
Mainframer Intellij Plugin
An intellij idea plugin for mainframer project
Stars: ✭ 125 (-7.41%)
Mutual labels:  ssh

Adams 0.3.2

Adams is a UNIX system administration tool written in Common Lisp.

You describe your systems (hosts) using resources having properties.

The properties are then probed and synchronized by Adams using only /bin/sh on the remote host, and /usr/bin/ssh on the control host.

Configuration example

Check out https://github.com/kmx-io/kmx-io/ for a detailed example of Adams usage.

Current status

Adams is currently able to use a local shell or connect to remote hosts via ssh.

Adams is this hardcore hacker using only /bin/sh commands. This makes ksh and bash suitable shells for adams as they are compatible with /bin/sh.

Supported resource types :

  • Host (hostname)
  • User (useradd, usermod, userdel)
  • Group (groupadd, groupmod, groupdel)
  • File (owner, group, permissions, content)
  • Directory (owner, group, permissions)
  • Package (Debian, OpenBSD)

Security design

You should only allow Adams what you would allow your system operators :

  • a shell accessible through SSH using a public key
  • apropriate sudo permissions

All commands issued to the remote hosts can be logged.

Adams does not grant the hosts access to its workstation while it works. Adams does not grant access to data belonging to any host. Adams does not send any data that is not of direct concern to the host. In short, all UNIX permissions are respected, Adams is a regular UNIX user.

Usage

1. Install repo.

2. Fetch adams sources.

  $ sbcl --eval '(repo:install :adams)'

3. Build and install the adams binary

  $ cd ~/common-lisp/cl-adams/adams
  $ make
  $ sudo cp build/adams /usr/local/bin/adams

4. Configure emacs (optional)

In your ~/.emacs file :

  ;;  Adams
  (add-to-list 'auto-mode-alist '("\\.adams\\'" . lisp-mode))

5. Write some resources in a .adams script

In the tutorial.adams file :

  #!/usr/local/bin/adams --script

  (resource 'host "adams.kmx.io"
            :user "adams"
            (resource 'user "adams"
                      :shell "/bin/sh"
                      :ensure :present))

  (with-host "adams.kmx.io"
    (sync *host*))

6. Profit.

  $ chmod 755 tutorial.adams
  $ ./tutorial.adams

The tutorial.adams script will synchronize the host "adams.kmx.io" according to the resource specifications given in the file.

7. DRY up your scripts using #.(include "file")

In the user/dx.adams file :

  ;; Thomas de Grivel (kmx.io)
  (resource 'group "dx"
            :gid 19256
            :ensure :present)
  (resource 'user "dx"
            :uid 19256
            :gid 19256
            :home "/home/dx"
            :ensure :present)

In your main script :

  #!/usr/local/bin/adams --script

  (resource 'host "adams.kmx.io"
            :user "adams"
            (resource 'user "adams"
                      :shell "/bin/sh"
                      :ensure :present)
            #.(include "user/dx"))

  (with-host "adams.kmx.io"
    (sync *host*))

ISC License

;;  Copyright YEAR AUTHOR <EMAIL>
;;
;;  Permission to use, copy, modify, and distribute this software for any
;;  purpose with or without fee is hereby granted, provided that the above
;;  copyright notice and this permission notice appear in all copies.
;;
;;  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
;;  WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
;;  MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
;;  ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
;;  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
;;  ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
;;  OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
;;

Contribute

To contribute, fork this repository and send us a pull request.

Please publish under the ISC License terms.

Authors

Thomas de Grivel [email protected]

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].