Skip to content

Linux - 2. page

Anything Linux related.

Configuring ownCloud 9 & Active Directory / LDAP Plugin Successfully

With this step-by-step guide, you will have your ownCloud 9 (and earlier) cloud server authenticating against Active Directory or LDAP correctly in no time!

Introduction

 

Recently, I went through the process of setting up a brand new ownCloud 9.1 server, after my previous ownCloud server had seen upgrades from 6.x all the way up to 8x.  If you’ve used ownCloud that long, you know the abundant changes and improvements that have been made along the way did not come without their growth pains; especially if you delved into encryption.  So, I decided to start fresh.  I use Active Directory to provide a centralized authentication source for everything in my personal “cloud,” so after setting up my new Dropbox clone, the first thing I needed to do was configure the LDAP user and group backend plugin.  I had a lot of problems getting the Active Directory usernames to match the ownCloud usernames, instead of showing a long string off numbers.  It was a lot of confusing UID, UUID, SAMAccountName and DN related confusion.  There aren’t any great guides to keep you from getting a headache, so I decided to make one.

 

Problems with the LDAP user and group backend plugin

 

It’s pretty straight forward to get an ownCloud server authenticating against and Active Directory server, but the biggest problem I’ve seen is the mapped usernames end up being long strings of numbers in ownCloud.  Although the display names are correct in owncloud, the actual username for all AD mapped logins, by default, are a long unique string makes things difficult.  For one, if you need to get to a users ownCloud data folder, there’s no intuitive way of knowing who’s is who’s folder from the command line.

With this step-by-step guide, you will have your ownCloud server authenticating against Active Directory / LDAP, with the following benefits:

 

  • The ownCloud username will match the Active Directory / LDAP username (no long incomprehensible string of numbers)
  • Any user added to a specified group created in Active Directory will automatically have ownCloud login privileges.
  • ownCloud users will be able to login using their username or email address (if specified in AD) interchangeably.

These three pluses make everything very seemless and saves a lot of headaches. So, lets get started.

Click Here to Continue Reading!

How-To Install ownCloud 9 / 9.1 / 9.x on Ubuntu 16.04 LTS for the ULTIMATE, Private, Dropbox Clone

Introduction

 

Let’s face it, since the advent of Dropbox, Box, Google Drive and the bazillion other cloud-based file synchronization platforms that have came into existence over the past decade, it’s almost a necessity. For the road warrior, using multiple devices, or even the traditional white-collar worker, having access to all of your files no matter what device you’re using is extremely convenient and adds an enormous productivity boost to our lives. One of my biggest concerns with all of the third-party services, however, is privacy and security. Allowing another entity to store my sensitive data, and trusting they will keep in secure, is pretty scary. Thankfully, there are many options to roll-your-own cloud file synchronization and it really doesn’t take much horsepower on the server side. With a low cost VPS (virtual private server), retired computer at home, or even a $25 RaspberryPi, you can easily build your own Dropbox clone that will put you in control of your own data. Today, I’ll walk you through setting up ownCloud 9.1 on Cannocial’s Ubuntu 16.04 LTS. I will be setting up my cloud on a virtual machine running on VMware ESXi, but the process is very similar no matter what hardware platform you choose. This step-by-step guide assumes you have a plain, unmodified, minimum installation of Ubuntu Server 16.04 LTS, with only SSH access. If you don’t have SSH running, or don’t want to enable it, console access will work just fine. So, lets get started!

 

Installing Prerequisites (Apache/MySQL/PHP)

 

Go ahead and login to your freshly installed Ubuntu 16.04 server.  Be sure to login with a username that has sudoer privileges.  This can be the username you selected during installation or specified when you provisioned your VPS.  Let’s make sure everything is up-to-date before going any further. We will use Aptitude to do so.

 

#  sudo apt-get update

#  sudo apt-get upgrade -y

 

Now we can jump in to the nitty gritty.  There are a few standard prerequisites needed for ownCloud to run.  Most people refer to this as the LAMP stack (short for Linux, Apache, MySQL, PHP).

Click Here To Continue Reading!

How to Update Proxmox VE When “You Do Not Have A Valid Subscription”

If you have recently dove into the Proxmox VE world, your mind is probably blowing chunks.  Proxmox gives you the unmatched ability to run hypervisor-like Virtual Machines, as well as containers, side by side with High Availability.  It’s an amazing virtualization platform and if you haven’t tried it out yet I highly recommend you do so.  After installing Proxmox 4.2 on one of my lab servers, I found the need to update it and I wasn’t about to pay for an Enterprise Subscription for my home lab.

proxmox-1

How to update Proxmox when “You do not have a valid subscription for this server, please visit www.proxmox.com to get a list of available options” and keep you Proxmox server updated!”

There are a few steps involved and they go something like this:

  1. Disable the enterprise repository that is configured by default
  2. Add the no-subscription repository
  3. Update apt so it knows what can be updated
  4. Use apt to upgrade any packages
  5. Upgrade the entire distribution, using apt, of course

First, lets disable the enterprise repository.  You can’t run apt-get update by default without a subscription, you will get an error.  So, lets comment out that repo so it isn’t checked.  Go ahead and putty / ssh / console into your Proxmox server, and run the following command:


sed -i.bak 's|deb https://enterprise.proxmox.com/debian jessie pve-enterprise|\# deb https://enterprise.proxmox.com/debian jessie pve-enterprise|' /etc/apt/sources.list.d/pve-enterprise.list

Click Here to Continue Reading!

How to Create an iSCSI Target & Extent / Share on FreeNAS 9 (and previous versions)

Today, I’m going to guide you through the process of creating an iSCSI target / extent on FreeNAS-9. This will also work on previous versions of FreeNAS, such as version 7 and 8. There are a few different ways you can go about creating an iSCSI share. You can dedicate an entire device (Hard drive, or RAID array) to the iSCSI share, or you can simply create a Volume, and create multiple iSCSI shares and each is simply a file on the volume. This approach works well because you can use part of a volume as an NFS share, part of it as a CIFS share for Windows, and if you want a few separate iSCSI targets you can just create a single file for each. Lets get started.

How to create an iSCSI Target / Share on FreeNAS

 

First, we need to add a volume using your hard drive or RAID array that is connected to your FreeNAS server. If you have already done this, you can skip this step.  Let’s get started with the rest.

Log into your FreeNAS web interface, and go to Storage > Volumes > Volume Manager.  Fill in a volume name (make sure it starts with a letter, and NOT a number, otherwise you will get an error).  Add one or more of your Available Disks (by clicking the + sign).  Select a RAID type if you wish to do so.  In my case, I’m using hardware RAID, so I will leave the default (single drive stripe, IE, JBOD).  Now click Add Volume.

 

freenas-1

 

Now that we have added a volume, we can begin the process of creating an iSCSI share.  This process required multiple steps, in the following order:

  1. Add a Portal
  2. Add an Initiator
  3. Add a Target
  4. Create an Extent (the file that corrasponds to the iSCSI share)
  5. Link the Target and the Extent together
  6. Start the iSCSI service

Click Here to Continue Reading!

FreeNAS 9 Error When Adding Volume – You must specify a new volume name…..

I’ve had quite a few friends and colleagues run into a problem trying to create a volume on FreeNAS.  This applies to FreeNAS 9, as well as older versions such as 8.  The error they get when clicking “Add Volume” is this:

“You must specify a new volume name or select an existing ZFS volume to append a virtual device.”

and under that:

“The volume name must start with letters and may include numbers, “-“, “_” and “.” “

Here is a screenshot:

 

freenas-error-1

Click Here To Read More!

How to install ownCloud on Ubuntu 14.04 LTS – Your own Open Source Dropbox

Dropbox is great.  But, you are putting your private, personal data in a corporations hands.  That is a bit scary if you stop and think about it.  The good news is that you can run your own Dropbox, using an Open Source software package called ownCloud.  It’s amazing and works very well.  In this guide, we’ll be installing ownCloud on Ubuntu 14.04 LTS.  It’s not very hard, and when it’s all said and done you have your own personal cloud storage platform that you control.  You can even enable server-side encryption so that if you server is compromised, your data is still safe.  Lets get started.

 

How to install ownCloud on Ubuntu 14.04 LTS

 

This tutorial assumes you have installed Ubuntu 14.04 and have updated it to the latest and greatest using the commands below.  Just FYI, I’m installing it on a virtual machine on ESXi 5.5.  So, make sure everything is updated using these two commands.

 


#  sudo apt-get update

#  sudo apt-get upgrade

 

Next, we need to install a webserver (Apache), a database server (mysql) and PHP.  This is commonly called the LAMP stack.  Fortunately, this only requires two simple commands now, thanks to taskel.

 


#  sudo apt-get install taskel

#  sudo taskel install lamp-server

 

During installation, you will be prompted to set a root password for mysql.  Make sure to set this as a secure password, and do not forget it!

 

2016-03-03 15_36_10-mike@stash_ ~

 

Click Here To Continue Reading!!

How to get URL rewrites & WordPress Permalinks working on Directadmin & Nginx

It’s no secret that I love using the Directadmin control panel.  The interface is very simplistic, and can be archaic at times, but it is very stable, fast, and extremely customization when using the Custombuild 2.0 scripts.  Recently, I did just that to deploy Nginx as the back-end web server, instead of the default, which is Apache.  Nginx is very fast and performs very well under heavy loads.  After migrating serenity-networks.com over, I quickly noticed that none of my links are working.  Because I use WordPress, I instantly knew it had something to do with .htaccess or permalinks.  The first thing I did was set permalinks to default, and everything started working again.  Nginx does not use, nor recognize .htaccess files, which are imperative to URL rewriting, and therefore permalinks.  So, I had to figure out how to solve this issue using configuration parameters in the Nginx.conf file.  But, this isn’t very straightforward with Directadmin.  Here is how to do it.

How to get URL rewrites and WordPress permalinks working with Directadmin, Custombuild 2.0, and Nginx:

The first thing you need to know is how Directadmin handles Nginx configuration files.  This is pretty simple.  It’s done on a per user bases, and the configuration files are located in /usr/local/directadmin/data/users/username/nginx.conf.   Pretty simple.  Each username has a folder, and within that folder is an nginx.conf file.  This is where you can set parameters per user and even drill down to a specific site for a user.  So, the first thing we will do is go to that directory, and edit the appropriate nginx.conf file for your user.

cd /usr/local/directadmin/data/users/

Look for the username for your user and cd into that directory.  If you do an ls, you will see many different files.

nginxconfdir

 

Click here to continue reading!