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.

Filename, size & hash SHA256 hash help File type Python version Upload date
uadm-0.7.5-py2.7.egg (32.3 kB) Copy SHA256 hash SHA256 Egg 2.7
uadm-0.7.5.tar.gz (13.4 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page