Monthly Archives: May 2013

Kubuntu and Timezones

If you have a problem with the timezone and the local time in Kubuntu you might try this:

sudo dpkg-reconfigure tzdata

Current default time zone: 'Europe/Copenhagen'
Local time is now:      Thu May 23 08:06:38 CEST 2013.
Universal Time is now:  Thu May 23 06:06:38 UTC 2013.

Multiple Display Config and AMD

If you have multiple display and a AMD grahics card and want to expand the desktop to all displays you might get a message like :

required virtual size does not fit available size: requested=
(3200, 1200), minimum=(320, 200), maximum=(1920, 1920)

To solve this you have to run the AMD display configuration:

sudo aticonfig --initial

to re-initialize your configuration files. You might have to restart (I did)

Now run:

sudo amdcccle

and you’ll be able to configure dual display.

Go to Display Manager and choose Multi-display desktop with display(s)… in Multi-Display tab for both monitors.

Restart Ubuntu after this, Then disable the “Mirror monitors” option in the Ubuntu display settings.

You might have to move the display around in the Ubuntu display setting to get things right.

Mount extern NFS filesystem

1. You need to install nfs-command package as follows (open terminal and type the following command):

$ sudo apt-get update
$ sudo apt-get install nfs-common

2. See The List Of All remote shares

$ showmount -e server-Ip-address
$ showmount -e 10.25.1.132

Sample outputs from my 10.25.1.132 NFS server:

Export list for basil:

/volume1/Photo     *
/volume1/Video     *
/volume1/NetBackup 10.25.1.*
/volume1/Music     10.25.1.*

3. Mount Shared Directory

Now mount /Music directory as follows:

$ sudo mkdir /mnt
$ sudo mkdir /mnt/Basil
$ sudo mkdir /mnt/Basil/Music
$ sudo mount -o soft,intr,rsize=8192,wsize=8192 10.25.1.132:/volume1/Music /mnt
$ df -h

Output from df command

Filesystem                   Size  Used Avail Use% Mounted on
/dev/mapper/ubuntu--vg-root   24G  6.0G   16G  28% /
none                         4.0K     0  4.0K   0% /sys/fs/cgroup
udev                         4.1G  4.0K  4.1G   1% /dev
tmpfs                        824M  800K  824M   1% /run
none                         5.0M     0  5.0M   0% /run/lock
none                         4.1G  160K  4.1G   1% /run/shm
none                         100M   56K  100M   1% /run/user
/dev/sda1                    228M   30M  187M  14% /boot
10.25.1.132:/volume1/Music   7.2T  3.8T  3.4T  53% /mnt/Basil/Music

4. How Do I Mount NFS Automatically After Reboot?

Edit /etc/fstab, enter:

$ sudo vi /etc/fstab

Append the following line:

10.25.1.132:/volume1/Music  /mnt/Basil/Music noauto,soft,intr,rsize=8192,wsize=8192

Save and close the file.

5. How Do I Remove Mounted NFS Directory (unmount NFS)?

Type the following command:

$ cd
$ sudo umount /nfs
$ df -h

Enable LDAP SUDOers on client

Copied from HOW TO: Configure LDAP for SUDO Support on Ubuntu Server 9.10 (Karmic Koala)
With some addition text by me and works on Ubuntu 13.04

1.) Install LDAP Client Configuration

I. Get LibNSS-LDAP package
TIP! Have your LDAP IP, Base Name, Admin Account and Admin Password Handy before executing this command.
Code:
sudo apt-get install libnss-ldap

…nCurses based setup screen will ask you information about your LDAP setup

 

II. Enable LDAP Support in PAM system

Code:
sudo auth-client-config -t nss -p lac_ldap

III. Verify PAM based LDAP Support

Code:
sudo pam-auth-update

NOTE: Skip Step 2 for installation on the LDAP server as we already did this above!
2.) Install sudo-ldap package

I. You will need to drop fully into root mode for this part!

Code:
sudo su

II. Turn off SUDO safety switch

Code:
export SUDO_FORCE_REMOVE=yes

III. Get package

Code:
apt-get install sudo-ldap

IV. Turn on SUDO Safety switch

Code:
export SUDO_FORCE_REMOVE=no

V. Drop back to user-land mode

Code:
exit

3.) Manually setup sudo redirection from /etc/sudoers to LDAP directory

I. Add support for sudo extentions in /etc/ldap.conf
WARNING: Take note of the double “>>” in line, you do NOT want to accidentally blow out your file!

Code:
sudo echo "sudoers_base ou=SUDOers,dc=example,dc=com" >> /etc/ldap.conf

II. Symbolically link Sudo Ldap Config file to main LDAP config file
NOTE: This is not obvious in ANY documentation I have reviewed, only support forums reveled this.
This file (sudo-ldap.conf) may already exist so check and rename if so

Code:
sudo ln -s /etc/ldap.conf /etc/sudo-ldap.conf

III. Add support for sudo / ldap communication in NS Switch configuration
WARNING: Take note of the double “>>” in line, you do NOT want to accidentally blow out your file!

The below line might already be in the file (nsswitch.conf) so chcek and one run if not. On my system is was already there.

Code:
sudo echo "sudoers: ldap" >> /etc/nsswitch.conf

So good luck 🙂

Goodbye Adobe

Dear Adobe,
I have been a Photoshop user for many years and have always liked your products. It have been good and a steady follower for all years.
I started out as a Photoshop Elements user and later Lightroom and when I had the money I bought Photoshop CS 6 on sale from Amazom.
I pay for software when the time, price and budget is right and as I’m a private amateur photographer the budget is not very big but I like quality and you software has given it to me all the years.
Your new cloud solution is way to expensive for me so it’s time to say goodbye.
Thank you for the good time we had together. I enjoyed it.
My best wishes to you all at Adobe

Ubuntu LDAP Client Config

The below is copied from the blog devnotcorp
It’s the simplest way I have found enabling LDAP authentication for Ubuntu. I have tested it on Ubuntu 13.04

1. sudo apt-get install libnss-ldap libpam-ldap ldap-auth-config

Installs auth-client-config ldap-auth-client ldap-auth-config libnss-ldap libpam-ldap and configures /etc/ldap.conf.
During install the following settings can be configured:

Should debconf manage LDAP configuration? Yes
LDAP server Uniform Resource Identifier: ldapi://ldap.mydomain
If you see errors like the following in your /var/log/auth.log, try to change ldapi to ldap:
May 10 12:47:30 sonar getent: nss_ldap: could not connect to any LDAP server as (null) – Can’t contact LDAP server
May 10 12:47:30 sonar getent: nss_ldap: failed to bind to LDAP server ldapi://ldap.mydomain: Can’t contact LDAP server
May 10 12:47:30 sonar getent: nss_ldap: could not search LDAP server – Server is unavailable
Distinguished name of the LDAP search base: dc=mydomain,dc=com
LDAP version to use: 3
Make local root Database admin: No
Does the LDAP database require login? No
Local crypt to use when changing passwords: md5

You can reconfigure the settings later on with
sudo dpkg-reconfigure ldap-auth-config

2. sudo auth-client-config -t nss -p lac_ldap

Configures /etc/nssswitch.conf.

3. sudo pam-auth-update

Configures /etc/pam.d/common-session.
Select the authentication methods to enable.

Now you can login to this client using your username and password stored in the LDAP directory, but you have no homedir.

So add this line to /etc/pam.d/common-session:

4. session required pam_mkhomedir.so skel=/etc/skel/ umask=0022

Creates homedir for user if it doesn’t exist.

To be able to type in user name during login (found as a comment for another LDAP client configuration)

5. sudo /usr/lib/lightdm/lightdm-set-defaults -m true

That’s it 🙂