Monthly Archives: April 2013

Settingup an owncloud server as an altetnative to Dropbox for a small buisness

We have a lot of users using Dropbox, especially those users that are mobile. It’s a great way to get files onto your iOS device, and synchronize files between multiple machines.

The down fall for IT departments can be of course security, control, and cost. Anything over the free 2GB account can add up quick. What if you have an office of 3 dozen mobile workers?

So I’m looking at setting up owncloud, as an inhouse “Dropbox” type server. For now, I just need to setup and do some basic testing to see if it’s even a possibility that we should further pursue.

I installed owncloud on a CentOS 6 VM. I used the instructions here. Couldn’t be easier. One note if you’re not comfortable or familiar with working in the command line … one the first line to copy and past into the command line, only copy the words after the “#”.

I had it up and running, syncing between the cloud, desktop, iphone, and ipad in about 30 minutes. Syncing is fast between all devices and there’s plenty of options for Admins to create users, groups, and edit permissions, including storage quota.

owncloud app on iphone

owncloud app on iphone

owncloud web interface

owncloud web interface

From what I see this is something other Administrators should take a look at. Owncloud is open-source which means it’s free! and it can run on linux so you don’t need to go out and purchase an overkill machine just to run it. Just some modest hardware with enough storage to give your users a reasonable limit.

Set Up Munk Web Admin on Mountian Lion

Munki is a great tool to control software installs and updates and munkiwebadmin is a browser based admin gui to manage and see exactly what’s on your clients machines.

Honestly if you have already setup a munki server, installing munkiwebadmin is a breeze and if you have any issues you should see the instructions here because I’ve noticed a few changes even since installing it myself and the site seems to be updated consistently. It’s pretty straight forward though and most of it can be copy and pasted even if you’re not sure exactly what the commands mean or do. This is a great project for the weekend in a virtual machine.

STEP 1: Install Prerequisites
Xcode

– open App Store and search or xcode, be warned it’s a large download.

– Once it’s download simply drag it to the applicaitons folder, then drag it on to the dock to make a shortcut

Command Line Tools

– open Xcode and go to Preferences > Downloads > command line tools … click install

STEP 2: Setup the Virtual Environment

Open up terminal and copy and paste the commands in red below.

sudo easy_install virtualenv

You’ll see a bunch of lines spit out. That’s normal.

webadmin-1

STEP 3: Create a new virtual environment.

cd /Users/Shared
virtualenv munkiwebadmin_env

webadmin-2

STEP 4: Activate the virtual environment:

cd munkiwebadmin_env
source bin/activate

STEP 5: Install munkiwebadmin and django prerequisites

pip install django==1.4.5
pip install mercurial
pip install -e hg+https://bitbucket.org/cleemesser/django-wsgiserver#egg=django-wsgiserver

STEP 6: Copy and Configure MunkiWebAdmin

git clone https://code.google.com/p/munki.munkiwebadmin/ munkiwebadmin

STEP 7: Edit Settings.py

cd munkiwebadmin
cp settings_template.py settings.py

Time to make some edits to the settings.py file.

Here’s what I do. Open the Settings.py in xcode, that way it’s a little easier to see what’s going on with the syntax highlighting,  and do a copy and paste of the words in red below. This makes it easy to find exactly where you should be making the changes.

Set ADMINS to an administrative name and email
Set TIME_ZONE to the appropriate timezone
Under INSTALLED_APPS uncomment django_wsgiserver
Set MUNKI_REPO_DIR to the local filesystem path to your munki repo. (If you’re using the default repo it would be  /Users/Shared/munki_repo)

Make other edits as you feel comfortable. Save and close the file.

webadmin-3

STEP 8: Initialize the Database

python manage.py syncdb
python manage.py collectstatic

STEP 9: Create a non-admin service account and group

Time to create the “munkiwebadmin” account:

Open System Preferences and go to Users & Groups. Create a Standard user named munkiwebadmin.

To make sure no one can log in with this account interactively, paste the commands below in to terminal to change a few attributes in the user record.

sudo dscl . create /Users/munkiwebadmin home /var/empty
sudo dscl . create /Users/munkiwebadmin passwd *

Now create a munki group and add munkiwebadmin to it.

sudo dseditgroup -o create -n . munki
sudo dseditgroup -o edit -a munkiwebadmin -t user munki

Make sure the munki group can read and write in our munkiwebadmin_env folder.

sudo chgrp -R munki /Users/Shared/munkiwebadmin_env
sudo chmod -R g+rw /Users/Shared/munkiwebadmin_env

Give this group read/write access to the munki repo (MunkiWebAdmin will need permissions to modify manifests). Again if you stuck with the default munki repo just copy and paste the below. Other wise just make sure to substitute the path to your repo in the commands below.

sudo chgrp -R munki /Users/Shared/munki_repo
sudo chmod -R g+rw /Users/Shared/munki_repo

STEP 10: Start the web application and test
Time to see the magic. Switch to the service account we just created:

sudo su
su munkiwebadmin

Start MunkiWebAdmin.

python manage.py runwsgiserver port=8000 host=0.0.0.0

Noe open your browser and go to http://127.0.0.1:8000. If you were successful you should be prompted with a login.

webadmin-5

Use the account you created back in step