Archive for the ‘Ubuntu Linux’ Category

Ubuntu lost root password

Thursday, August 18th, 2005

On popular request, here’s the command that let you change the root password if you just simply don’t know it. Anyway I need to warn you, that the root user itself is not enabled by default, so it really does not have a password either.

I must cite it again: you do not need a standalone root user to work with Ubuntu!

The normal user account that you have - holds the right to do super user operations, so you’re the root yourself. All users, who belong to the admins group will automatically have right as well (check settings in the /etc/sudoers file).

The sudo way means that you just want to do a task, but not run a shell as root. This is a huge difference! So instead of saying su, or su - to get to a root shell, you can say only sudo whatever and you’ll be asked your normal user password only. That’s all :)

If you still keen on to have the normal root user on your box, type:

sudo passwd root

However I should say again, you don’t want the root user became active on your box. If you want a root shell, simply run: sudo -s to get one!


Ndiswrapper and the ASCII WEP key

Monday, August 8th, 2005

Using Ndiswrapper under Ubuntu is fun! Really easy to configure and install. My AP is in ASCII WEP code mode, so I just need the following commands to make it work: iwconfig wlan0 essid APNAME
iwconfig wlan0 key restricted s:THEPASSWORD

The *nix way. I love it.

Update: if you plug in the USB wifi device after the bootup procedure, it’ll not load the drivers. You must say ifup wlan0 to active it.


Ubuntu restore after Windows Install

Monday, August 8th, 2005

I badly needed Windows on my laptop, and had only some hours to install it, so I skipped the step to make it a dual-boot system.
As I returned to so called “normal operation” I wanted to use Ubuntu again. What to do? The Grub multiloader had been overwritten by Windows, so switching the Boot flag to the partition is not enough.
1) I found a nice image file at http://www.troubleshooters.com/linux/grub/grub.htm, downloaded and created a bootable CD with it.
2) When the Grub menu appeared, I pressed c for command-line options.
3) Typed: root (hd0,0)
setup (hd0)

4) Voila, Grub found the necessary vmlinuz file and the initrd (which was manually impossible for me) and after a reboot, I was able to log in to Ubuntu again.
5) I added the Windows partition to the Grub menu (/boot/grub/menu.lst)
title Microsoft Windows
root (hd0,1)
savedefault
makeactive
chainloader +1

6) don’t forget to change the ‘hiddenmenu’ item to ‘menu’, otherwise you’ll not see the boot menu, just after pressing Esc
7) and from now on the two operating systems live together, happily ever after.


Spamassassin misery on Fedora

Monday, August 1st, 2005

sa-learn --D --force-expire equals -30% cpu usage… sweet ;)


Compile Codebehind web projects with Mono

Monday, August 1st, 2005

I’ve found a cool article about codebehind stuff under http://bdn.borland.com/article/0,1410,32057,00.html and I’ve upgraded http://skaelede.hu to be a Codebehind project. (All I needed to do is to remove the src="index.aspx.cs" from the index.aspx file header) then run the following script given in the example. In the last step, you need to move the DLL to the so called bin directory of the given project.


How to auto start a service on fedora?

Monday, May 9th, 2005

I always forget, so I cite here:

if you install one new service, you can start by . . . service snmpd start | stop
. . . and add to the always on service list: chkconfig --add snmpd
chkconfig --level 345 snmpd on

That’s it.


Ubuntu linux on my gericom x5 force

Saturday, May 7th, 2005

I’ve just installed the Ubuntu linux version 5.04 - the so called Hoary Hedgehog (what a crazy name?!) and it just works fine. Anyway, some workarounds were needed, because I downloaded the iso, and then burned it with Roxio ToastIt! on 24x, and it failed to install the base system while I was in normal install mode.
I burned another CD with 8x speed, failed again - so I changed to “server” mode at the boot prompt (the expert mode simply failed on initializing the IDE devices.. argh) - finally, I was able to install the base system, so I had a Linux on my winchester.
Ubuntu goes the Mac OS X way - the root user is disabled. You need to sudo everything, which is boring. On my powerbook, i’ve started with re-enabling root, here i will not spend my valueable time on it ;) To get a working XServer, you need to type: sudo apt-get install ubuntu-desktop This command will install all stuff, and it will work fine. If your CD is broken as my one, simply sudo vi /etc/apt/sources.list and remove or comment out the line that adds the CD’s repository - so you’ll be able to install the Gnome desktop too.
If you need midnight commander, uncomment the Ubuntu software universe repositories as well ;), then you can do: sudo apt-get install mc
If you have an LCD display, and eventually try to run it with Nvidia driver, you need to edit the /etc/X11/xorg.conf file: you need to disable the dri mode, so comment out the Load “dri” line under the Section “Module”. You need to modify the settings for the default Monitor as well: Section "Monitor"
Identifier "Generic Monitor"
HorizSync 30.0 - 130.0
VertRefresh 50.0 - 160.0
Option "Flatpanel"
EndSection
Now, you’ll see the desktop in other resolution than the original 640×480 ;) To the folks out there using the buggy old Via 8233 cards with Via Technologies VIA1612A chipsets, and you hear distorted and wicked sound, you need to add the following to /etc/modprobe.d/alsa-base : options snd-pcm-oss dsp_map=1 and restart the computer, or do update-modules. goodbye scratchy sound ;)


iPod on Linux - first time

Saturday, March 19th, 2005

I’ve connected my iPod via USB to my friends computer, running Fedora release 3.
I couldn’t find the device first, but I realized, that it was automounted under /media/usbdisk.
The iPod is formatted as a HFS+ volume, and the 2.6.10-1.770-FC3 kernel successfuly used it as a device, I was able to download and upload files, and it was really-really fast!


MySql on Fedora: lost root password

Wednesday, March 9th, 2005

i’ve personally never ever faced with this problem, that I’ve completely lost the control over MySql. Somehow - I dunno how - I totaly locked out myself from the database :) I found some information on the web on how to deal with this problem, but I have a solution for other Fedora users, because none of the others’ will work on this installation:

1) You need to completely stop MySql.
Running service mysqld stop is not enough, you need to type the following (with root or with the mysql user): kill `cat /var/run/mysqld/mysqld.pid`

2) If nothing shows up on the screen, this is golden silence - so you were successful. If you see a ‘cat: var/run/mysql/mysqld.pid: No such file or directory’ error, then please run: slocate .pid (you need to have slocate installed either by apt-get or yum) - it will show up the list of all pid files on your server - there you can find out, where mysqld stores its.

3) A new mysqld must be started with the parameter --skip-grant-tables.
The main problem is, that other distributions have the safemode version under the name mysqld_safe, but under Fedora, of course it is safe_mysqld
So type in the following: safe_mysqld --skip-grant-tables &

Now the server replied with someting like the following: Starting mysqld daemon with databases from /var/lib/mysql.

4) Enter: mysql -u root

5) Execute the following SQL: UPDATE mysql.user SET Password=PASSWORD('your-new-password‘) WHERE User=’root’;
(you need to change the your-new-password string to the desired root password)

6) Then: FLUSH PRIVILEGES;

Now you’ll have a clean and newly passed root acount to your own server ;) Easy, isn’t it?