header

Samba setup on Gentoo Linux

I had tried to setup Samba a couple of times before because I thought it would be cool, but never really got it going. I finally invested some effort and followed the steps from this tutorial and got it working. That tutorial provides instructions on how to setup samba for network printing as well as being a windows file server, but I’m only using the folder sharing.

It now works perfectly. Here are the exact steps that I did:

#1. emerge net-fs/samba //emerge the script
#2. nano /etc/samba/smb.conf //setup the config, includes the following information
#——-
[global]
workgroup = IWGroup
server string = Samba Server %v
log file = /var/log/samba3/log.%m
max log size = 50
interfaces = lo eth0
bind interfaces only = yes

hosts allow = 144. 127.
hosts deny = 0.0.0.0/0
security = share
guest account = guest
guest ok = yes

[VideoCardDrivers]
comment = drivers
path = /home/VideoCardDrivers
browseable = yes
writeable = yes
public = yes
create mode = 0766
guest ok = yes
#—-
#3. mkdir /home/VideoCardDrivers //make the shared directory
#4. smbpasswd -a root //created the user ‘root’, but i don’t think i’ll use it
#5. nano -w /etc/nsswitch.conf //edited the line hosts to be {hosts: files dns wins}
#6. chmod 755 /home/VideoCardDrivers //make the directory properly permission’d up
#7. /usr/bin/testparm //make sure the settings worked fine
#8. rc-update add samba default //adds samba to run at startup
#9. /etc/init.d/samba start //starts samba

Works like a charm.

Comments (2)

MySQL/PHP (w/GD) counter

I’ve finished for the most part (as far as I know) The RayDehler Counter . V1.0 is completed, and I can think of many improvements already that need to be done, but this is a good start.

  • Here’s how it works

    Redirected using apache’s mod_rewrite, it takes the url <img src=”http://raydehler.com/counter/2.png”> and transforms it to <img src=”http://raydehler.com/counter/counter.php?id=2″>.

    Then, using the GD libraries of PHP4, it connects to the MySQL database, grabs the row corresponding to the ID. It then increments the ‘loads’ and puts the new value back into the database. It then creates the image with its size based on the value of the number of the ‘loads’ field. Lastly, it outputs the ‘loads’ value to the image and destroys the image.

  • Here it is in action
    This page has blargpost has been viewed Blarg Counter times.
    (Note the img uri is just http://raydehler.com/counter/2.png)

    Ironically the thing about it that I’m most proud of is the user management using PHP sessions for authentication. Now that this is done, I can potentially create many more scripts and use the current as a backbone for each of them.

  • Comments (0)

    25 free .info domains from dotster

    Dotster is offering for a limited time 25 free .info domains. Very good deal, can’t beat free. The rest of my domains are on GoDaddy, but they are selling .info domains for $1.95 each… why pay when you can get for free, eh?

    Comments (1)


    blogtimes