Proftpd FTP server initialization problem using uBuntu

identify-ftp-process

I had been battling with this particular issue for a while on my virtual machine running uBuntu 8.04 Hardy Heron. Basically it was a straight through install of 8.04, after which I installed lampp for PHP, mySQL, and FTP services so that I could host a couple of websites on this virtual machine.

At first everything was running 100% I hadn’t changed the default FTP server configuration that appeared to be working out of the box from the base install. Then one day I decided I wanted to play around with some settings and ended up somehow removing my FTP server – not entirely though as something was continuing to hold port 21 up and not allow me to use any other FTP server that used port 21.

What I did was I configured proftpd which seems to have come along with my install of lampp (Also known as xampp). I configured my users, IP address and all other details, but I was still getting problems when trying to connect via FTP from another PC on the local network.

Trying to start proftpd from the command line sudo /etc/init.d/proftpd start would result in the service appearing to start, but it wouldn’t actually be running. I confirmed this by opening the gproftpd GUI from System – Administration – GPROFTPD. The status at the top right of the GUI would say “Deactivated”

A very helpful user on the ubuntu forums also showed me a useful debug command that helped me identify my problem.

From the terminal, type:

sudo proftpd -nd6

This apparently starts proftpd in debug level 6.

It gives you a bunch of diagnostic information, and on the last line I spotted my problem:

Failed binding to ::, port 21: Address already in use

So, something else was already using port 21. Obviously my old FTP server’s remnants somewhere. Now to figure out what was using it.

sudo netstat -anp --tcp --udp | grep LISTEN

From that command, I found a line with :21 in it (indicating port 21) and at the end of the line, I found the process name and process ID number. The process in my case was inetd.

Now I went to see what the inetd.conf file had in it in terms of configuration:

sudo nano /etc/inetd.conf

This loads the nano text editor and displays the contents of the file. I had :

ftp stream tcp nowait root /usr/sbin/tcpd /usr/sbin/in.ftpd

I made a copy of this inetd.conf file as a backup, and then deleted that entire line, as that was obviously what was holding port 21. Ctrl-X exits the editor, and I chose to press “Y” to save changes.

Now I needed to kill and restart the inetd process. I used :

sudo killall -HUP inetd

This kills the process, and allows inetd to restart and reload the inetd.conf file.

I went back to my proftpd.conf file and ensured it was setup to use port 21 for FTP connections, then restarted the proftpd service with :

sudo /etc/init.d/proftpd stop
sudo /etc/init.d/proftpd start

Then finally I went back to my other PC, and retried the FTP connection using FileZilla FTP client, and finally got connected! I hope this helps anyone with similar issues, as I had to use multiple sources to try and figure out what was causing this and where.

Adding a user as a local administrator, Windows Server 2008. (Update)

I originally posted about adding a user as a local administrator with the command linehere.

Since then I have realised that this only applies to Windows Server 2008 Small Business Server. Windows 2008 Standard still uses the old GUI method of adding a user as local admin that is found in Windows XP, or 2003 for example.

This can be done by opening the Computer management console, (right-click Computer) and then select “Manage”.

Expand Local Users and Groups, and then click on Groups. Double click Administrators, click Add, then type the user name in the window that opens and then click Ok. (Check name if you are not sure of the user’s entire username).

That will add the user to the local administrators group the easy way (GUI) and save you the trouble of using the command line instead.

See the screenshot below for what you are looking for.

add-administrator-local-server-2008

 

Mac vs PC Parody

This is quite old but I still find it hilarious the way the majority of Mac users love to brag about their Apple products. Don’t get me wrong, I have nothing against Apple. I even own an Apple Powermac G3, running Mac OS 9 which I used to use for design. They are however just PCs running Mac OS with different looking peripherals in the end.

The fan boys are the people that ruin Apple products though. These clips below illustrate this “fanboism” quite well…

How to set e-mail disclaimers using Sophos Puremessage for outgoing mail.

This is a short how-to for setting up a disclaimer to be appended to any outgoing exchange mail.

The version of the Sophos Puremessage admin console that I will be using is Version: 3.0.1.0.

First of all open up the Puremessage administration console.

Expand “Configuration” then expand “Transport (SMTP) Scanning policy” Now click on the “Disclaimers” item.

sophos-admin-console-1

Click the dropdown menu and select “Add disclaimer”. A link with the name “Text” will now appear. Click on this and type in your disclaimer text – you will need to type your disclaimer in the text and HTML area, then click “OK”

sophos-add-disclaimer

Also make sure that the disclaimer is turned on. When it is enabled, the ON status will show near the top right of the console. If the OFF status is currently showing in orange, then that means that the disclaimer rule is off.

E8400 Gaming rig build

This is an old post from my other site. I thought as it was IT relevant I would clone the small write up I did across to this blog…

I recently bought myself a new rig, consisting of a Coolermaster CM-690 and the following hardware:

Asus P5Q P45 Pro motherboard
Intel E8400 overclocked to 3.6GHz 24/7
OCZ 2GB ATI Heatspreader RAM DDR800 4-4-4-12
Sapphire ATI HD 4870 512MB GDDR5 Graphics card
OCZ GameXstream 600w Power supply
Western Digital 750GB SATAII Hard drive
Logitech G15 Keyboard (orange backlight model)
Logitech MX518 (5 year old mouse that has travelled the world with me!)

For display I chose a 24″ Dell LCD with a native resolution of 1920×1200 and 6ms response time.

My ultimate goal was to build a faster, cooler and quieter PC than the previous one I had in S.A.

Right, so in my last rig I had the pre-built CM-690 L-shaped window panel. This came with the chassis when I bought it, so I was pretty lazy and didn’t change anything. I also had a Coolermaster Aquagate watercooling unit that fitted in 2 x optical drive bays, which had the pump, radiator and everything incorporated, cooling my E8200 on the old rig. Temperatures were not much better than the Zalman 9700LED that I used to have on it and it was quite messy. I also didn’t enjoy the tiny tubing that this unit used, hence my custom kit choice with 1/2″ diameter tubing for this project. I had never built myself a custom watercooling system, so this will be my first. It will also be the first batch of modding I have done in about 10 years! (The last mod I did was on an AMD K6-2 333MHz in an AT case many, many years ago)! That is barring some odd LED, and minor case mods here and there.

Anyway, here is an image of the final product (Case cut, window installed, hardware assembled and modded to fit the watercooling gear. Cables neatened and basically everything finished, barring the watercooling of the graphics card.

final-1

night-shot

I cut a rough pattern out of the top with my jigsaw, this is where the radiator is to be fit:

case-cut

I cabled-sleeved most of the loose / visible wiring throughout the chassis:

cable-sleeving

Next to be cut was the side panel – Masked off the area to be cut, and used the jigsaw once again:

perspex

This is the box of goodies (watercooling hardware) I ordered from Specialtech:

goodies

The waterblock for cooling the CPU:

cpu-block

Shortly after finishing the water components, and tubing, I started the system up for leak testing…

test-run

A few weeks later the graphics card was ready to be added to the watercooling system. This is a Sapphire ATI HD 4870 512MB (GDDR4) card. I had to remove the stock air cooler, and re-apply some new thermal compound. I used Zalman STG-1 thermal paste for this.

4870-air

Here the card is naked, with the old thermal compound applied to the GPU. The card still needed to be cleaned with some pure alcohol to remove the old thermal paste.

4870-naked

Everything installed, Feser one non-conductive cooling fluid in the loop with the system up and running :

final-2

A small update on this build.

Since the original work was finished, I have now upgraded the RAM. I added another 2GB OCZ RAM to give a total of 4GB. I also pushed my original overclock a bit further, and now run the FSB at 445MHz with a CPU multiplier of 9x giving me a total of 4.0GHz on the E8400. The RAM is running a multiplier of 2x overclocking the four modules to 890MHz each, with timings of 4-4-4-12. My Vcore setting for the processor is on around about 1.375 volts, and my RAM is sitting at 2.2 volts which is what I consider a safe 24/7 setting for RAM modules cooled by passive heatsinks. The FSB is set to 1.16 volts for the increase FSB speed to hold stable. I also flashed the 4870’s bios with a custom image, that sets the card’s default core speed to 795mhz (from a default of 750mhz) and the memory to 1100mhz (from a default of 900mhz). I then use Catalyst Control Centre to up the core speed to a further 830mhz for gaming. The PC now runs at these speeds 24/7 and has no stability issues.

Setting group policy to enforce automatic updates

This is a quick how-to for setting automatic updates using group policies in Windows Server 2003.

Start off by opening up Active Directory Users and Computers from the server.

Hopefully you have got a specific OU that you want to apply this group policy to. In my case, there are about 100 computers listed under the Computers OU in Active Directory. My servers are located in a different OU, which is just as well, because I don’t want this policy to apply to the servers.

Right click on the OU you want to apply the Group policy to, and select Properties. From this properties page, select the Group Policy tab. If you already have the Group policy managment snap-in installed, you will see something similar to the screenshot below – in this case just click “Open” to continue.

active-directory-gp

The group policy management window will open. Right-click the OU (In my case Computers), and select “Create and link a GPO here”

create-gpo1

Give the new GPO a name. I called mine “Install automatic updates”

gpo-name

Now, under the Linked Group Policy Objects tab, right click the new policy name, and select “Edit”

edit-new-gpo1

Now the Group Policy Object Editor will open. Under Computer Configuration, expand Administrative Templates, then Windows Components, then Windows Update.

automatic-update-gpo-settings

On the right panel, right-click “Configure Automatic Updates” and select “Properties” Set the status to “Enabled” and choose your automatic update setting – I used option 4, which will download and install updates on a schedule, which I set to 17h00 every day.

Click Apply, then OK.

configure-automatic-updates

You can optionally set the settings for the option “Delay restart for scheduled installations” otherwise the PCs will be given a count down timer of 5 minutes once updates are installed to auto restart. The user can delay this if they are logged in, otherwise configure this setting to set the count down timer up to a maximum of 30 minutes. The user can always click restart later anyway.

Close the policy editor, and group policy management down once you have set your various options for automatic updates. The GPO will now be linked to the OU “Computers” and any PC listed in this OU will have this policy applied the next time they login, or group policies are applied.

You can manually enforce policies on a PC by typing the following in command prompt, or the run dialog box :

gpupdate /force

Hope this helps anyone looking to achieve a similar result!