PDA

View Full Version : sambastart



Harry Kuhman
01-12-2005, 06:27 AM
In another thread in this forum (http://www.knoppix.net/forum/viewtopic.php?t=16258) Tuesday, rcook mentioned how to start a samba session from the command line. He pointed out that "The workgroup of the XP machine needs to be WORKGROUP. " I've started Samba with sambastart from the command line the way he described and it seemed to start fine. However, my current workgroup on the Windows boxes is not WORKGROUP and I'm not seeing the samba server from Windows. At the moment too much other stuff is going on to let me change the workgroup around, not that I really want to anyway. The thing is, I really expected to see WORKGROUP, after all, I've brought friend's machines over here that have a different workgroup, and when I hook them up to my LAN I soon see both my workgroup and their workgroup name under the "Entire Network" icon in "Network Neighborhood". So why don't I see WORKGROUP?

I looked for a man page on sambastart (hoping there might be a switch to let me change the workgroup from WORKGROUP to my own workgroup's name). There doesn't seem to be a man page for sambastart. Can someone explain why and just what is going on here? I feel I'm missing something obvious.

Harry Kuhman
01-12-2005, 06:36 AM
update: WORKGROUP finally showed up, although it took about an hour!

However, here's the next problem: during the startup, sambastart asked for a password to use. I gave it a simple one for this test. It asked me to confirm it, which I did and the password was accepted. I can open WORKGROUP and see knoppix there. When I try to connecy to knoppix from my windows network neighborhood, I'm asked the password. My password is being rejected, saying Incorrect password, try again. I know what I entered, but it.s just not being accepted. Anyone have insight on the next step?

Harry Kuhman
01-12-2005, 10:25 AM
Well, here I am again, the only one posting in this thread. I've learned a bit more, but I have at least as many new questions as answers. Here's the current status:

I figured out why I could not connect to the Samba server as described above. I was on my Win98 desktop, and, although I could see the workgroup named WORKGROUP, when I tried to log into it Win98 asked me only for a password, and not a username. So with Win98 I never had a chance to give the name that matched the password.

I fired up my notebook in XP and quickly found out that while Win98 lets me see all of the Workgroups on my LAN, XP seems to want to hide this information from me. I could only see the group I was in, could not even see what other workgroups were out there (although it would be easy enough to sniff the wire and find this). I changed my computers workgroup to WORKGROUP. XP insisted that I reboot before this would go into effect. When I did that I could see the Knoppix computer. (Curiously I could still see the other computers in my old workgroup that were on-line when I rebooted!) And I could log into Samba now and do all the networking stuff, since XP asked for both a user name and a password.

So here are the new questions: It is my understanding the Samba is older than XP. And it's certainly not designed to help Bill force people to migrate from older Windows systems to XP. So how did Windows users log into a Samba server before XP if Win98 (and I'm guessing other windows systems) don't let you input the username? And why apparently lock the Workgroup name at WORKGROUP, particularly since it's such a pain to deal with different workgroups in the only Microsoft OS that you can log in from? And, of coures, the questions still stand: Are there secret switches that get me past some of this on sambastart and where can I find documentation on sambastart if there is no man page?

I'm going to move this thread to the Networking forum in the hope of getting a response.

UnderScore
01-12-2005, 05:03 PM
It is my understanding the Samba is older than XP. And it's certainly not designed to help Bill force people to migrate from older Windows systems to XP. So how did Windows users log into a Samba server before XP if Win98 (and I'm guessing other windows systems) don't let you input the username? And why apparently lock the Workgroup name at WORKGROUP, particularly since it's such a pain to deal with different workgroups in the only Microsoft OS that you can log in from?

Harry, I say the next phrase without trying to be an ass: Welcome to the hell that is Windows networking. Windows 95/98/98SE/ME (known as Windows9X) style of networking is known as share level security or a peer to peer style. This means every shared resource on a Win9X system is protected by a passwords (either a read-only passwd or a read/write password) & not a username & password combo. In Win NT/2K/XP/2K3, the model moved from share level to a traditional server model of user level security. This means that usernames with passwords are used & these usernames have certain rights to access specific shares. In order to make these two models work with each other, a NT/2K/XP/2K3 server makes assumptions for a Win9X client's "username" & workgroup. The problem you, myself, & others have run into is the two security models tend to collide. Then throw in samba and you have a mess. I attribute this ALL to microsoft. MS did not get serious with Networking until NT 4.0 and they did not even get it half right until win2000.

I learned all about the above parapgrah through frustrating experiences with it but also with by creating a test network and inspecting the packets that flow as connections are made and passwords are sent. See the SAMBA Documentation (http://us4.samba.org/samba/docs/) for a great free PDF book that teaches you WHY windows behaves the way it does and how to work with and around it.

The documentation (and in particular the man pages) given on this web page are taken from the latest development version of Samba. If you are using an earlier version of Samba then you may find some differences.

The current Samba-3 release version of the Samba-HOWTO-Collection is available in PDF and HTML formats. Those wishing to obtain a hard copy of this document may do so by purchasing The Official Samba-3 HOWTO and Reference Guide.

The current Samba-3 release version of the Samba-Guide may be found here in PDF (http://us4.samba.org/samba/docs/Samba-Guide.pdf) and HTML formats. Those wishing to obtain a hard copy (which includes a CDROM with all Example files) may do so by purchasing Samba-3 by Example.
The publisher's site http://www.phptr.com/title/0131472216# has a free PDF copy (http://www.phptr.com/content/images/0131472216/downloads/0131472216_book.pdf) of this book: Samba-3 by Example: Practical Exercises to Successful Deployment (http://www.amazon.com/exec/obidos/ASIN/0131472216).

Since win9X does not easily interoperate with WinNT or samaba in a server model, I solved my problems by not using Win9X in my network. Perhaps you do not have this choice, but if I have to use Windows in a network (I try not to) then I use win2000 or winXP.
I hope this helps.
James

UnderScore
01-12-2005, 05:10 PM
This is a great intro into just how much windows networking is a skunk-ugly-patch-works of protocols.
Implementing CIFS: Introduction
Author: Christopher R. Hertel
0. Introduction: CIFS From Eight Miles High
http://ubiqx.org/cifs/Intro.html

Harry Kuhman
01-12-2005, 10:38 PM
James,

Thanks for the links. I have't been able to read them yet, but will.

Without trying to be an ass: I was already figuring out that Microsoft had a lot of probems. But I'm very confused on the choices Samba seems to have made, since it's entire purpose is to work with Microsoft networks. How did anyone log into a Samba server before XP (or, at least, with WIn98)? And why lock the workgroup name to WORKGROUP (if it really is, I'm still hoping there will be a switch somewhere that I don't know about yet) if XP is so poorly designed that it can only see one workgroup at at time?

Harry

Harry Kuhman
01-12-2005, 11:02 PM
A few more questions to highlight what a n00b I am: Just what is sambastart? There seems to be no man page for it. The samba server seems to really be named smbd. So what is sambastart, some sort of script that starts smbd? If so where is it? And how would I find this and other such things so I didn't have to ask these stupid questions?

The link James gave leads me to hope that with the smbd configuration file I can at least get past the WORKGROUP problem (although I don't yet see any way to log in from Win98, and most of my systems are on 98 ). But I need to understand better what sambastart is doing before I can do this, and it never seems to be mentioned in the documentation (as least as much as I have read, every link leads to many more interesting links that need to be followed).

UnderScore
01-13-2005, 04:05 AM
Just what is sambastart? It is a Knoppix specific samba startup script. Most other distros use /etc/init.d/smbd and nmbd, or they use /etc/init.d/samba.
Because of all this wrokgroup WORKGROUP confusion, I use WORKGROUP as the workgroup for all my Windows machines.
You can change the workgroup for a samba server. Edit the /etc/samba/smb.conf file. In my customized Knoppix 3.7, smb.conf file, line 25:
workgroup = WORKGROUP

I changed it to
OOPSLAN
saved it & and restarted via
/etc/init.d/samba start

When my Win98SE (a VMWare session) machine boots up, it brings up a username & password box titled "Enter your password for Microsoft Networking & asks me to login. This login box is for the Client for Microsoft Networks which is configured in Network Neighborhood properties, Primary Network Logon. Anyway, in the box is my Full name, James UnderScore, and the password is empty. I leave a blank password & hit enter to continue. My Win98 machine can see the OOPSLAN workgroup & can see the samba server inside of it. It can not login to the samba server. This is because Win98 only knows how to authenticate using the name that was entered. Thus when I capture the packets with ethereal and try to login to the samba server fromt the Win98 machine, it is sending as the user my full name: JAMES UNDERSCORE. Since this username does not exist on the samba server, it fails & does not even give me a password box. If I log out of win98 & login as an account that does exist on my samba server, when I connect it gives me a password box, I enter the password & I am successful and get to see the shares. If I log out of win98 & do not login but simply hit cancel I am unable to browse any of the network.

My WinXP machines can see the samba server inside workgroup OOPSLAN and it brings up a login box so the user can authenticate.

I conclude the following:
Win98 needs to have a username in the logon box for the Microsoft Networks client to be able to browse the network.
This username must match the account that exists on a samba box for it to browse the samba box.
Win98 can see and connect to samba servers both in and out of it's own workgroup so long as the username exists on the samba box.
Unlike WinXP, Win98 does not popup a full authentication logon box when connection to a server. Instead it is dependent on the Client for Microsoft Networks. WinXP does not have the same limitations as Win98 since it browse or map drives & will bring up a login box so the user can authenticate

I use samba to store TV shows, mp3s, and all our own created music tracks (amateur musician). I create read-only shares for important data such as my mp3 archive or my tracks, samples, loops for songs. I created writable shares so that I can upload from any PC. If data is important I then ssh into the samba server & move it from the writeable share to the read-only share.
Here is my smb.conf file and I found a forum for samba help http://www.tek-tips.com/threadminder.cfm?pid=865&page=1.
I hope this helps.
James

smb.conf

# Global parameters
[global]
netbios name = DUALCRUSH
server string =
workgroup = WORKGROUP
interfaces = eth0
bind interfaces only = Yes
encrypt passwords = Yes
log level = 1
log file = /var/log/samba/log.%m
read raw = No
name resolve order = lmhosts host bcast
socket options = IPTOS_LOWDELAY TCP_NODELAY
os level = 65
preferred master = Yes
domain master = Yes
dns proxy = No
create mask = 0644
hosts allow = 192.168.1.0/24 127.0.0.1 (list of allow hosts here)
hosts deny = ALL
write cache size = 262144

[readmp3]
comment = Readable mp3 archive
path = /mnt/mp3/readmp3
guest only = No
guest ok = Yes
read only = Yes
browsable = Yes
valid users = guest, root

[gamestuff]
comment = gamestuff
path = /mnt/audio/gamestuff
guest only = Yes
read only = Yes
guest ok = Yes

[readaudio]
comment = Read Only Audio
path = /mnt/audio/readaudio
guest only = Yes
read only = Yes
guest ok = Yes

[more]
comment = more more
path = /tmp/more
read only = No
guest only = Yes
guest ok = Yes

[writemp3]
comment = Writeable mp3
path = /mnt/mp3/writemp3
read only = No
guest only = Yes
guest ok = Yes

[writeaudio]
comment = Writeable Audio
path = /mnt/audio/writeaudio
read only = No
guest only = Yes
guest ok = Yes


[video-01]
comment = Video Archive 1
path = /mnt/video/video-01
guest only = Yes
guest ok = Yes
read only = Yes

[video-02]
comment = Video Archive 1
path = /mnt/video/video-02
read only = Yes
guest only = Yes
guest ok = Yes

[video-03]
comment = Video Archive 3
path = /mnt/video/video-03
read only = No
guest only = Yes
guest ok = Yes
writeable = Yes


[printers]
comment = All Printer
path = /var/spool/samba
guest ok = Yes
printable = Yes
browseable = No

Harry Kuhman
01-13-2005, 08:15 PM
Uou've been a big help James. I'm slowly putting the pieces together.

fpd
02-14-2005, 09:56 PM
Maybe this might help:

I work with a strange Windows sytem which requires the user to enter the workgroup followed by a "slash" then the username (and of course, the password):

USERNAME: workgroup/fpd
PASSWORD: ********

The "slash" was either "/" or "\" depending from which MS OS I was logging in... crazy.