Nerd Notes

/dev/brain: no space left on device

Archive for the ‘Ubuntu’ Category

Windows shares in /etc/fstab

leave a comment »

Ok, this is pretty much an easy one, but I keep forgetting what the heck you need to specify in your /etc/fstab in order to mount an smb share (at least on a Linux system). Here is an handy example:

//host.lan/sharename /mnt/host/sharename smbfs defaults,rw,noauto,username=scott,password=tiger,uid=myuid,gid=mygid 0 0

All of the above needs to be on one line. Of course you need to replace a few things:

hostname or ip address of the host you’re connecting to
the windows share name (pretty easy, uh?)
a local directory where the share is to be mounted (this must exist before mounting so “mkdir -p” it)
the windows share username
the windows share password
the user id the filesystem needs to be mounted as; this can be either numeric or symbolic and is usually your day-to-day user account
the group id the filesystem needs to be mounted as; this can be either numeric or symbolic and is usually your day-to-day user account’s primary group

Once you’ve added that line into /etc/fstab, you can simply:

# mount /mnt/host/sharename

Written by Mirko Caserta

March 2, 2007 at 5:19 pm

Sun One Webserver 6.1SP3 on Ubuntu Edgy

with 3 comments

Okay, so, from time to time, I do pretty lame things too. I was trying to install Sun One Webserver 6.1SP3 on my Ubuntu Edgy laptop at work and, when launching the installer I got:

$ sh setup
/home/mcaserta/tmp/.setup: error while loading shared libraries: cannot open shared object file: No such file or directory

“This is an easy one”, I thought. I recalled the days when installing a recent Sun JDK on a Debian system required you to install a compatibility package such as libcompat-something or libstdc-something. So I fired up synaptic and made a search for both. I couldn’t find anything.

I said to myself: “If I make a couple symlinks, I can fool the system into thinking it’s got the library it requires and make it use the default one”. So, I did an:

$ sudo ln -s /usr/lib/ /usr/lib/

After this, the setup software started spitting out to me all sort of missing library files errors, which I tried fixing using the same principle as above.

After an hour of symlinking in pain, I went looking for the libcompat Ubuntu package and I found out it’s in Edgy in the universe repository. So, I went into synaptic, hit the repositories setup in the settings menu and enabled all available repositories. I had them all enabled before the Edgy upgrade but, apparently, the upgrade has disabled some of them.

I shut down synaptic and fired an:

$ sudo apt-get install libstdc++2.10-glibc2.2

and everything went fine since then, except that trying to launch the admin server results in a core dump and I’m looking into that right now.

Written by Mirko Caserta

October 30, 2006 at 11:54 am