Wednesday, February 01, 2006

Confessions Of A Linux Newb Pt. II

I finally got back to this after a serious lack of inspiration over the holidays.

Well, I'm still trying to get Samba to work. Unfortunately, I can't count how many different smb.conf files I used and modified. I went high and low and even used so-called 'bullet-proof' conf files to no avail. In general, I could see the server from my XP machine but I could never browse the server. It would always give me one of two error messages that went something like "You might not have access to this service...". Unfortunately, it seems that most of the resources I went to were dealing with an older version of Samba or a different flavor of Linux. You would think that wouldn't matter, but it does. Obviously I could be wrong because of my newbness, but the default install folders, the way the service actually runs, and default data directory paths all combine to make this a very confusing experience.

Last night, after a few nights of toiling over the past week, I finally looked specifically for a Debian resource that talked about installing and configuring the latest version of Samba (2?). What I found on AboutDebian.com was this nice nugget:

http://www.aboutdebian.com/lan.htm

Scroll almost all the way down and you'll find a nice configuration file. I modified this file for my own network and guess what???

It didn't work.

I tried restarting (BTW, can anyone tell me how to restart the nmbd and smbd daemons without restarting the server?), then restarting my XP machine, etc, etc. Nothing worked. Then I went over the conf file in detail and this is where the magic happened. Well, not really magic, but I noticed something peculiar in the configuration file:

[files]
comment = Shared Files
path = /home/ftp
writeable = yes <--- SPELLING!!
guest ok = yes

(emphasis, arrow and word SPELLING!! mine)

I changed writeable to writable, as it is spelled in the rest of the conf file and once again angels from on high flooded me in the glory, singing, and light. Yes, I could now browse the network share on the server. I tested the share by putting a test text file out there and I could see it and open it from the server itself.

Then I restarted another computer on the network. It too could see and browse the network share.

Then I put all my files onto the share from my PC. Once that transfer was done, I could open those files from my other PC, add folders and delete folders.

Nice relief. Now onto Apache config, mail server, and maybe even a voice server for some friends of mine. :)

Need to add RAM though.

One more note: Without fail, every resource I found on the Samba configuration file told you how to configure it. But very few told you how to troubleshoot the situation if it didn't work as advertised. This is tough, because then it forces you to go to the community and wait for an answer or search for the exact problem you are having. That isn't a unique thing to Linux, but it is really tough to find the answers. In the end, I still don't know why the other config files wouldn't work, and on the one that finally did work, there was a simple spelling error from the tutorial that was causing a problem. Even then, I don't know for sure if it was the spelling thing or if the server goblins finally gave up the fight. I was this -->][<-- close to saying fuck it and going back to Windows, at least so I could get a network share going. I feel relieved now, but the rollercoaster ride isn't over yet.

Edit 02/02/2006: I emailed the owner of AboutDebian.com about the typo and he corrected it. Is that what this newfangled community thing is all about? I guess I just contributed. :)

3 Comments:

Anonymous Anonymous said...

Generally, services are controlled with the service command from a console when you are logged in as root. For example service smb restart tells SAMBA to restart (without restarting the whole computer). The three big options for the third word are restart, start, and stop. Many services also offer status. The second word of the command is the service name. SAMBA is usually smb (I believe this also restarts the nmb services, but watch the output of the command). Apache is usually httpd (e.g. service httpd status should show apache's status).

7:05 AM  
Blogger Tyler said...

I will try that next time. I probably won't be able to get back to this until next week, but I'll see if I can get the services to restart without restarting the server.

Thanks!

11:32 AM  
Anonymous Anonymous said...

By the way, don't forget to use the testparm command to test your smb.conf file for errors when you make changes. While not a requirement, it can save some headaches.

You can type man testparm for more detailed help on this command. Personally I do testparm smb.conf from a console when I'm in the same directory as the smb.conf file.

9:56 AM  

Post a Comment

<< Home