Under African Skies!

Under African Skies!
an inquisitive mind

Creating Usernames in OpenOffice and Excel

April 22nd, 2008

I recently had to create a list of about 200 usernames. Doing that by hand/manually will have taken me some time. I searched on the net and the help files of both excel and openoffice calc.

Here are the fomula’s I used,

=LOWER(CONCATENATE(MID(A3;1;5);MID(B3;1;2)))

and

=LEFT(A3,5)&LEFT(B3,2)

The first is rather difficult and took me some time to figure out,
the “lower” is used to change the text to all lower case characters,
then comes “CONCATENATE” with the specified fields, A3 and B3,
after that I used the “MID” function to specify the beginning character ‘;1″ and the amount of characters to follow “;5″

That formula took the first 5 characters from field A3 and the first 2 characters from field B3. Joining them together with no spaces in between.

This formula worked for me in OpenOffice 2.3

The second formula worked both in Excel 2002 and OpenOffice 2.3

To explain the second formula,
the “left function was used to start reading the field from the left,
using field A3 and using the first 5 charaters,
the ampersand (&) is used to join the two fields A3 and B3,
the goes for the second field B3, using the first 2 characters.

I then used the followign formula to create the users home directories,

=”/home/”&C3&”",

this prefixed the current text in field C3 with the value “/home/”

Then I used this data sheet to import into webmin to bulk create new users. There are some more data needed to do the bulk users creation from webmin, which I didn’t mention here. Check the webmin documention for more info on that.

, , , , ,

Do you use OpenSource software

February 15th, 2008

May I make an assumption, hell it is my site after all :)

Surely you must be using some kind of open source software right? How otherwise will you stumble upon my blog. Or perhaps your one of the lucky folks searching for an African Safari, getting to my site. Doesn’t really matter to me, I am pretty sure you make use of a computer. So the question is still relevant.

Do you like/use Firefox, GAIM, Pidgin, Open Office or any other kind of open software on your personal or work computer?

Leave me a comment, I’d love to hear what everyone uses.

Just a note, if your comment isn’t displayed immediately, don’t be alarmed, Akismet will be keeping it until I have approved it. Just keeping spam away

, , ,

One reason I use Linux & Firefox

February 15th, 2008

Having just moved over to a windows XP box to check out a site in IE. I was reminded why I moved to linux and firefox combination.

Running about 4 windows of IE6, they just suddenly vanish into thin air. No error, no pop-up “send to Microsoft”, nothing just gone.

Note that I don’t claim that firefox doesn’t crash, or my linux installation don’t go a might crazy now and then. But at least when firefox crashes, it helps me to “recover session”, no need to go in the history to find the last accessed URL’s. Just makes life a little easier, that is why we use computers in the first place isn’t it.

What a lovely way to end the working week, with a rant ;)

, , ,

Howto: mailman subscriber list export

July 9th, 2007

I have scoured the web for an answer. Alas I have found it, but I have lost the URL :(

Luckily I am able to pick it from the history, if have mailman installed uner /usr/local/mailman, yours might differ.

There you’ll find all the files relating to mailman, the one of importance here is “list_members” which can be found under the bin directory.

eg: /usr/local/mailman/bin/list_members

That is the file that will export the list of members from mailman. To get the list run, ‘/usr/local/mailman/lists’
this will give a list of mailman lists currently on the system.

Then all you need is to run the following command,

‘/usr/local/mailman/bin/list_members listname > “textfile” ‘

make the textfile of your choice, that should print it all into a text file for you.

, ,

When passwd, CLI and ROOT gets dangerous

June 25th, 2007

Next time when you want to change a user passwd, make sure to type the username… especially when you are logged in as root. You may not be so lucky to find that you just hit ‘enter’ after passwd and then continued to change the user account.b I have managed to log myself out for 3 days :) yeah it took me that long to realise my mistake

SO BEWARE, especially if its a remote server that you do not have access to all the time??

, , , ,

Routing & IPTables

June 20th, 2007

Why does it have to be such a bitch, I need to get that “Routing for Dummies” if there even is a book like that.

Anyone with with routing experience…linux…Iptables.

Ubuntu Ultimate v1.2

April 29th, 2007

Yeah I finally got a hold of a copy. Not bad at all, saves me from a lot of downloads. I only had to get like 32mb ;) Just java and flash plugins for firefox.

I did manage to get the SMC2802 v2 card running aswell under ndiswrapper, which I very gratefull for, otherwise I would have still been dual booting Windows 2000. Only thing is it takes up a lot of space with games and apps I won’t be using. Better to remove than having to download I guess.

My digital camera also worked just fine when I plugged it in. DigiKam helped a lot.

So all that still needs to be done is to copy all my data from the old harddrive and then I am set again.

I must admit I am quite amazed at the at what the pc is capable of, Athlon XP 1700+ running at 1.4Ghz with 51mb pc133 ram. It goes quite well :)

Ubuntu Ultimate Edition

March 19th, 2007

Nice if you look at the features, but i just have on tiny problem or perhaps a mega one. It is 1.7G, that’s baiscally more than 2 discs on a 128k line ;)

It will take me the better part of a week to download.

There’s also a number of software that I am not likely to use. So I will be beter to just download all the software as needed. My PC has enough clutter on it, don’t need more software that I don’t use.

dos2unix and chmod permissions

October 26th, 2006

I seem to make the same mistake time and again.
Just a not to restore htm/l files back to permissions, chmod 644, so that apache can actually serve them.

For some reason when i run dos2unix and files it removes the permission, yet to find out how to retain the permissions, when converting the file. perhpas ‘man dos2unix’ might help :P

Squid Cache Manager - Access Denied

August 31st, 2006

Some time ago I installed squidguard to filter the content being browsed.
Today I wanted to see what is up the proxy server, since it took a while to respond. Using the webmin interface to access the Squid Cache Manager, I kept getting access denied, i searched awhile on the net for a solution but to no avail.

Then looking at the error againI realised that i looked rather familiar. The problem was that squidguard did not allow access to the page. So I opened the squidguard.conf file and had a look.

i added the localhost address to the “Source Addresses”:

src local {
ip 127.0.0.1
}
and also added “local” to the acl section:

local {
pass all
}

which solved my problem after a squid restart. I suppose reload might have worked aswell.

So I ended up with the following:

#
# CONFIG FILE FOR SQUIDGUARD
#

dbhome /var/lib/squidguard
logdir /var/log/squidguard

# TIME RULES:
# abbrev for weekdays:
# s = sun, m = mon, t =tue, w = wed, h = thu, f = fri, a = sat
#
# time workhours {
# weekly mtwhf 08:00 - 16:30
# date *-*-01 08:00 - 16:30
# }

# SOURCE ADDRESSES:

src admin {
ip 192.xxx.xxx.xxx/24
}

src local {
ip 127.0.0.1
}

src students {
ip 192.xxx.xxx.xxx/24
}

dest adult {
domainlist dest/adult/domains
urllist dest/adult/urls
expressionlist dest/files/expressions
redirect http://localhost/forbidden.html

« Previous Entries