mount samba from linux

Do you have a linux box or you have booted of a live cd and you want to mount a samba share here is the command(s) for it.

#smbmount //ipaddress/share /mnt/moountfolder -o username=username,password=password

or

#mount -t cifs -o username=username,password=password //ipaddress/share /mnt/mountfolder

Any of the two methods above should work. You can use the name of machine instead of ip address if you want, and no space between username and password else you will get an error.

smbmount

Install mysql jdbc driver Linux

Am assuming you already have MySQL installed, download the MySQL Connector-J from their website.

Unzip/Untar the file and copy mysql-connector-java-version-bin.jar to java jre/lib/ext.  Doing this will allow the java interpreter to find the driver.

Reset password Linux

In case you ever forget the your password in Linux there are several ways you can go about resetting it if you have physical access to the machine.  On your boot up menu select the recovery mode option you should end up at a command prompt on a black screen type the following cmd

#passwd username

Remember to change out ‘username’ with your real username. You will be prompted to enter the password twice, when done just restart your machine and you should be able to log in with your new password, if the cmd completed successfully . This method works in some Linux distributions but not all of them.

Another option is to boot up from Live CD, open up a command prompt and mount your HD as root/super user or with sudo whichever applies. Chroot your mounted drive then use the passwd cmd to change password as below.

$su

#mount  /dev/hda1 /mnt/hda1

#chroot /mnt/hda1

#passwd username

You will be prompted to enter the password twice when done just restart your machine and you should be able to log in with your new password

NB: To reset root password with the above methods just run the passwd command without including a username.