Skip to main content

UADM - Ubuntu administration scripts. A set of script that allows to automate task and notify the administrator by mail when thing went wrong. Update os, backup directories on a remote samba server, auto reinstall vmware tools on new kernel.

Project description


UADM - Ubuntu administration scripts. This project aims to use python to automate server administration task and notify the administrator by mail when things went wrong. It contains precoded script like: update os, backup directories on a remote samba server, auto reinstall vmware tools on new kernel, create a new apache site with openssh chroot...

# Prerequisite

- Centrify [optionnal]

# Installation

>sudo apt-get install python-pip
>sudo pip install uadm

## Edit the config file
>sudo nano /etc/uadm/uadm.conf

## updateos
>sudo nano /etc/crontab
Add this line at the ends of the file:
> 05 6 * * 2-4 root uadm updateos

## newsite script with centrify and auto_mount

Activate pam_script for auto_mount
> sudo nano /etc/pam.d/common-session
Add this line before "session required"
> session required runas=root

Create empty open and close script
> sudo bash -c "echo '#! /bin/bash' > /usr/share/libpam-script/pam_script_ses_open"
> sudo bash -c "echo '#! /bin/bash' > /usr/share/libpam-script/pam_script_ses_close"
> sudo chmod +x /usr/share/libpam-script/pam_script_ses*

Linking uadm pam_script_ses_open
> sudo rm /usr/share/libpam-script/pam_script_ses_open
> sudo ln -s /etc/uadm/scripts/ /usr/share/libpam-script/pam_script_ses_open

sftp chroot
> sudo nano /etc/ssh/sshd_config
> Match Group "*,!sudo,!domain admins"
> ChrootDirectory /home/%u
> ForceCommand internal-sftp
> AllowTCPForwarding no
> X11Forwarding no

# Upgrade

>sudo pip install --upgrade uadm


# Usage

Edit the file /etc/uadm/uadm.conf to match your own reality!
Create your script in /etc/uadm/scripts/myscript based on /etc/uadm/scripts/
Call your script with:
>sudo uadm myscript

# Work in progress!!

This is a work in progress. Any suggestion for a cleaner deployment or new scripts is welcome!

# Known Issue:

## newsite script

When using centrify, you need to manually add the group in /etc/centrifydc/groups.allow for each site

Project details

Download files

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

Files for uadm, version 0.7.5
Filename, size File type Python version Upload date Hashes
Filename, size uadm-0.7.5-py2.7.egg (32.3 kB) File type Egg Python version 2.7 Upload date Hashes View
Filename, size uadm-0.7.5.tar.gz (13.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page