Skip navigation.

Mr Green's house of joints.

Enter with THC in blood.

Posts tagged with "Linux"

Free poker clock which runs under Linux.

, , ,

If you play a lot of live poker like me you can use Simple Tournament Director to keep track of blinds and levels in the tournament. It's similar to The Tournament Director except that it's completely free, runs under both Windows and Linux and it's really fast to configure! You'll have your tournament running in 1 minute.

It offers you the basic functionallity you need in a home game. You can adjust leveltimes, blinds and antes, and you can save your tournament setups to disk. It also has support for "speaking" the blinds.

How to unsecure Samba

This is not the proper way to do things from a security perspective but IT WORKS!!!

In Gnome under Ubuntu there is a menuchoice:
System -> Administration -> Shared Folders

This let's you set up shared folders via Samba, but it will never let you access those folders from another computer, thus making it totally useless.

When a windows user selects a folder for sharing that folder is accessible to all users on the network, and that is probably how you'd expect it to work if you try to do the same thing under Linux. That's just not the case. You may share folders till your eyes pops out, but that is all that is going to happen. All this security is probably a good thing in a corporate network, but on a home-network, protected by a firewall, it's just one big hassle.



Turning off Samba authentication

In order to make those folders you share with the Gnome front-end samba app you need to unsecure Samba a bit. It is just a tiny line you need to add to your smb.conf file:
Change
;security=user
to
security=share

This says to samba that users connecting through Samba don't need an account on the linux machine. Now if you create a shared folder, remote users can access it as long as they can connect to the linux machine and the permissions for that folder allows "other" to read and write. By setting security = share you avoid the following steps for each new sambauser:
sudo useradd newsambauser
sudo passwd newsambauser
 enter system account password
 enter system account password
sudo smbpasswd -a newsambauser
 enter samba password
 enter samba password
sudo /etc/init.d/samba restart



Security the easy way

If you worry about security, you can specify the ip-adresses that are allowed to access via Samba to allow only IP adresses on your local network. On my network every computer gets an IP between 10.0.0.2 and 10.0.0.255 so inserting the following line in the global section of smb.conf will make sure only computers on my network will have access to samba:
hosts allow = 10.0.0.



Proper permissions for existing files and directories

As stated above the permissions for the existing files and directories you share must be correct. They must be readable and writable by everyone. Use this command to allow "other" and "group" read and write permission:
sudo chmod -R 777 /home/share

This will recursively give all files and folders below /home/share, including the share folder read/write permissions.



Proper permissions for new files and directories

When you add a new folder or a file to your new share you'd want everybody to automatically have read/write permissions to it. This is accomplished by specifying the "create mask" and
"directory mask" properties in smb.conf like shown below:

[global]
security = share

[public]
   comment = Public Folder
   path = /home/share
   public = yes
   writable = yes
   create mask = 0777 ///// New files are created with rwxrwxrwx permissions.
   directory mask = 0777 // New directories are created with rwxrwxrwx permissions.

Windows reinstall messes up grub.

,

Last night I reinstalled Windows to make it a mean, lean gaming machine. And that's what it looks like it's gonna be. A major advantage with using Linux for all your non-gaming needs is that you don't need to install all sorts of crap on your Wintendo partition. That's something to think about for you die hard gamers. Reboot in thirty seconds is a nice thing!

The only thing installed on my Wintendo now is drivers for the Radeon x800 Pro card and the Soundblaster Live soundcard. I also installed the latest version of DirectX and the game I'll be playing 98% of the time; Counter Strike:Source and Steam. Now all I need to do to is tweak Windows a bit.

Of course the Windows installation messed up the grub bootloader and now I can't access my precious Ubuntu Linux. Now I need a way of getting GRUB back, as I do not plan to use Windows until Dapper is released and I'm not about to reinstall Ubuntu.

There is a howto at the wiki so I'll check out that when I get home from work.

Recovering Ubuntu after installing Windows


PS! As opposed to installing Ubuntu, where all the hardware works out of the box, Windows did not have drivers for the Soundblaster Live 5.1 soundcard :D

A word of advice:

Do not use the Super Grub Disk as it doesn't work, at least it did not work for me.

When using the Live CD approach, DO NOT setup grub on (hd0,1) or whatever is behind the comma for you. USE "setup (hdo)" instead.

This will reinstall grub on your MBR which is what you want, I tried the hd0,1 approach first with no luck and that made sure that the linux OS could not be booted when running setup (hd0) afterwards. I guess it installed the grub boot files where the linux kernel were supposed to boot from.


So to sum it all up, this is what I do(Overwrites MBR):

Boot the livecd.
Start a terminal.

sudo -i
grub
find /boot/grub/stage1 // Will print something like (hd0,1)
root (hd0,1)
setup (hd0)
quit



Reboot computer.

Now your old grub menu should be there.

File permissions

There is a great article regarding file permissions at Linux Forums:
http://www.linuxforums.org/security/file_permissions.html

Signing JAR files.

, ,

In order to get access to the filesystem all jar files in an application must be signed if it is started via Java Web Start or if it is an Applet.

First step is generating a keypair with the keytool.

/usr/lib/j2sdk1.5-sun/bin/keytool -genkey -alias green -keypass greenpass


green is the alias for the keypair, and greenpass is the password to access that alias(or keypair). The keypair will be stored in the file .keystore in your homedirectory unless you specify otherwise.

You'll be asked a lot of questions, you may lie or just hit enter!

Create a self-signed certificate:
/usr/lib/j2sdk1.5-sun/bin/keytool -selfcert -alias green



After the keypair has been genereated the jar file can be signed with jarsigner:

In it's easiest form, jarsigner's syntax:
jarsigner jarfile alias

/usr/lib/j2sdk1.5-sun/bin/jarsigner JWSTest.jar green


It will ask for both passwords specified while generating the keys.

The jar file has now been signed ;)

IBM DeveloperWorks

Over at IBM there is a lot of great tutorials about Linux.

http://www-128.ibm.com/developerworks/linux

Click the Technical Library link on the left to get to the tutorials.

New harddisk.

Added a new harddisk to my ubuntu installation last night. Actually the harddisk was NTFS and belonged to windows. Without the ability to write to NTFS partitions in Linux I had to move it over.

After a lot of burning to clear the disk of data I did the following to get it under ubuntu's control.

sudo fdisk /dev/hdb


d (Delete the existing windows partition.)
n (Create a new primary partition, for the entire disk.)
w (Write table to disk and exit.)

To format the disk I used the following command:
sudo mkfs.ext3 /dev/hdb1


When this completed all I needed to do was to mount the new drive somewhere so I added the following line to /etc/fstab:
/dev/hdb1     /home/rjs    ext3    defaults   1   1


To actually get the disk mounted according to fstab I just typed:
sudo mount -a 


So now I have 200 extra gigabytes of free space to fill up, I think Azureus will overheat tonight.
November 2009
M T W T F S S
October 2009December 2009
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30