home > notes > samba [ printer-friendly version ]
Animal Crossing
AOL Images
baked beans
Bass Guitar
AOL main.idx
Crash IE
Disk Hog
Dual Heads
FireFox prefetch
Highway Hacking
ISO images
Chip's Challenge
sims cheats
Sim Tower hack
Solaris USB
spray cans
SSI Banners
HTML Symbols
ToolTalk error
CDE Wallpaper
Windows 7 Password


Samba is a Unix utility that allows directories to be shared with Windows machines. Samba is very powerful and complex, and you need to go get a good book on Samba to realize its full potential.

Sometimes, though, you just need a quick-and-dirty way to share directories between Unix users and Windows users. This example illustrates just about the quickest, dirtiest way to share data - a wide-open folder definition that lets anyone on the network read and write files without providing any kind of login or password information.

Samba Installation and Configuration

Solaris 9 includes Samba by default, so the setup for me was greatly simplified. If you don't already have Samba installed, you need to find it and install it, of course. On Solaris 9 machines, you'll see S90samba in the /etc/rc3.d directory - at boot time, this script is run automatically. It checks for the existence of a file named smb.conf in /etc/sfw and starts up Samba if the file is present.

Minimal smb.conf File

You should see a file called smb.conf-example in /etc/sfw - this is a good starting point, and you can learn a little about how Samba works just by looking in that file. For a quick-and-dirty global share, though, all you need is this (comments removed for brevity's sake):

[global] workgroup = CENTRAL preserve case = yes short preserve case = yes default case = lower password level = 4 encrypt passwords = no netbios name = metapatch server string = metapatch security = share local master = no dns proxy = no [scrkshare] path=/spare_2/samba read only = no guest only = yes browseable = yes writable = yes public = yes printable = no create mode = 0755 comment = SCRK Shared Folder

Pick a WORKGROUP name that makes sense in your Windows network context - if you're running Windows networking, you should be able to determine the correct value for WORKGROUP easily. The name of the Unix server in this example is metapatch, so I put that in for the netbios name and server string parameters. The path is simply the name of the directory on the Unix machine that you want to share with your Windows users - create the directory and set 777 permissions on it, or some such.

Using security = share means that the security level is going to be defined by the share definitions, and specifying guest only = yes short-circuits the entire username/password authentication process. There are a number of very elegant and sophisticated ways Samba can do user authentication, but you can avoid that whole can of worms by throwing security out the door and putting up a wide-open share.

After creating smb.conf, just execute /etc/rc3.d/S90samba start as root to fire it up. You should be able to access the share from a Windows machine or with smbclient on the Unix servers.

So, there you have it - quite possibly the world's most half-assed, unsecured, dangerous Samba share.

home Never try to teach a pig to sing. It wastes your time and annoys the pig. privacy