bash -c "$(curl -fsSL https://raw.github.com/gist/3970060/adduser-init.sh)" && source ~/.bashrc
Created
October 28, 2012 21:51
-
-
Save gpittau/3970060 to your computer and use it in GitHub Desktop.
init
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!bash | |
#run as root | |
install() | |
{ | |
DEBIAN_FRONTEND=noninteractive apt-get -y \ | |
-o DPkg::Options::=--force-confdef \ | |
-o DPkg::Options::=--force-confold \ | |
install $@ | |
} | |
username="${1:-gpittau}" | |
apt_key= "${2:-F430BBA5}" | |
adduser $username | |
### | |
echo "deb http://ppa.launchpad.net/byobu/ppa/ubuntu lucid main" >> /etc/apt/sources.list.d/sources.list | |
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $apt_key | |
### | |
apt-get update | |
### | |
install vim | |
ln -sf /usr/bin/vim /usr/local/bin/vim | |
### | |
install sudo | |
sed -i -e"/^root/{h;p;N;s/root/$username/g}" /etc/sudoers | |
### | |
install tmux byobu |
Author
gpittau
commented
Oct 29, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment