Operating Systems

Active Directory authentication in Ubuntu

This article will explain how to log inside a Linux box using Windows Domain credentials. This is especially useful in an enterprise environment. I am assuming that my windows username is james.attard and the domain is called ACME. First of all we install Likewise-Open:

james@madvip.net:~$ sudo apt-get install likewise-open

Now we can try to join the domain ACME with a domain administrator account. I'm assuming that my windows username james.attard is part of the domain admins:

james@madvip.net:~$ sudo domainjoin-cli join ACME james.attard

Joining Ubuntu to a Windows 2003 AD

First of all you need to install the following packages:

* Samba (version 3):
o samba
o samba-common (installed by default)
o smbclient (installed by default)
o winbind

* Kerberos:
o krb5-config
o krb5-user

Edit /etc/samba/smb.conf:

[global]
security = ADS
realm = mycompany
workgroup = mycompany
password server = obelix.mycompany
wins support = no
wins server = 10.0.20.202
invalid users = root
# Winbind settings
idmap uid = 10000-20000
idmap gid = 10000-20000
# For testing
debuglevel = 2

Enabling locked accounts in HPUX

You can’t use vi to re-enable an account if you are using password aging or “trusted” password databases, and the user is aged out or locked out due to too many login failures.

To enable a disabled HP-UX account via the command line, run one of these commands:

/usr/lbin/modprpw -l -k username

/usr/lbin/modprpw -l -x username

Is my OS / Oracle running 32-bit or 64-bit software?

DBAs often need to know if they should install Oracle 32-bit or 64-bit software on a given server. If the operating system support 64-bit applications, the 64-bit Oracle distribution can be loaded. Otherwise, the 32-bit distribution must be installed. The following Unix commands will tell you whether your OS is running 32-bits or 64-bits:

Solaris - isainfo -v (this command doesn't exist on Solaris 2.6 because it is only 32-bits)

HP-UX - getconf KERNEL_BITS

AIX - bootinfo -K

Enabling Largefile support on HPUX

This morning I tried to uncompress an Oracle dump file which was quite big (around 3.5GB) and to my dismay I was greeted by the following error:


# time uncompress bigfile.dmp.Z
bigfile.dmp: File too large

real     3:05.3
user     2:21.9
sys        18.4

After some research I found out that my vxfs filesystem didn't support large files. To enable largefile system support:


# /usr/lib/fs/vxfs/fsadm -o largefiles /
Example: # /usr/lib/fs/vxfs/fsadm -o largefiles /u12

To verify that the largefiles flag is enabled:


aMSN on Ubuntu

aMSN is a very cool instant messenger software similar to Kopete and Gaim which supports webcam. Infact I decided to install the latest aMSN 0.98b from SVN. The only trouble I encountered is to configure correctly tcl/tk 8.5 to de-uglify the fonts (i.e. using anti-aliasing fonts). I found out that I needed to install the libxft-dev package. You can find more details in this howto - http://ubuntuforums.org/showthread.php?t=84765 .


Compiz-fusion and Java desktop apps

I’m using Ubuntu 7.10 desktop edition with compiz-fusion and modal/emergent java windows are not displayed ( only grey background ) to solve this, I added the following environment var on the bashrc / bash_profile of the computer users that must deal with java display applications

export AWT_TOOLKIT=MToolkit

This solves the visualization of java desktop apps with compiz-fusion.


Being root in Ubuntu

One of the main differences between Ubuntu and other distros, is the use of 'sudo' to do anything as root. You are not allowed to log in as root, however there are times when you need to do multiple operations as the root user. In order to achieve this you must type the following command:

sudo -s

Flush sendmail queue

I just found out about this feature for flushing the sendmail queue. This is useful if, say, your mail server was down all weekend and you JUST CAN'T WAIT for the normal queue flush to occur because you've gone through email withdrawal by not being connected for a couple days. In the event that you, say, just rebuilt your mail server and wanted to make sure everything was working correctly you'd also want to watch the queue as it's processing. Normally you'd just run the following to flush the queue and see the results:

/usr/sbin/sendmail -q -v

Finding services on a subnet

Today I needed to find out where was my old workstation in the company. However I had forgot its IP address - the only thing I remembered is that I had an openssh server open. So I needed to scan all the subnet for that particular service (port 22). This is how I did it:

nmap -p 22 -P0 -sT 10.150.3.0/24

Syndicate content