LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   YASQ - yet another samba question (https://www.linuxquestions.org/questions/linux-networking-3/yasq-yet-another-samba-question-100316/)

itsjustme 10-04-2003 08:51 PM

YASQ - yet another samba question
 
Ok, I'm trying to setup samba on my little home network. Right now I am just working with my red hat 8 machine and my windows 2000 machine.

On W2K, when I click on "My Network Places/Computers Near Me" I can see 2 icons, one is the shares from many moons ago that I set up to share from w2k and it's named Bsw2k, the other icon is what I am setting up currently in red hat and it is Bsl1.
Now, I don't know how w2k named that icon Bsl1. bsl1 is the username I log in with on my red hat machine.
When I click on that icon it opens up and shows the directories I am trying to share: /home/bsl1/test and /home/bsw2k .

When I click on either of those I get that "The network name cannot be found." message. And in that message dialogue it is saying that the network name it is talking about is
\\Bsl1\/home/bsw2k
Something doesn't look right about that.

Any ideas.?

thanks...

(I don't recall having this much trouble last time I did this. I have the Red Hat 8.0 Bible.)

david_ross 10-05-2003 07:35 AM

It seems to be using unix paths in the share names. Try posting smb.conf if you can't spot an error anywhere.

itsjustme 10-05-2003 01:44 PM

Here's the smb.conf file that was created by swat:
Quote:

[root@localhost samba]# cat smb.conf
# Samba config file created using SWAT
# from localhost.localdomain (127.0.0.1)
# Date: 2003/10/04 20:01:38

# Global parameters
[global]
workgroup = HOME
netbios name = BSL1
server string = Samba Server
encrypt passwords = Yes
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*password* %n\n *Retype*new*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
unix password sync = Yes
log file = /var/log/samba/%m.log
max log size = 0
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
dns proxy = No
hosts allow = 192.168.1. 127.
printing = lprng

[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No

[/home/bsl1/test]
comment = samba test directory
path = /home/bsl1/test
hosts allow = 192.168.1. 127.0.0.

[/home/bsw2k]
path = /home/bsw2k
read only = No
hosts allow = 192.168.1.
I enter the netbios name as 'bsl1' ins swat and it gets capitalized in the smb.conf file. I now see that that is where the so-called network name on the bsw2k machine becomes \\Bsl1\ . If I take that out of the conf file then I have the same error mentioned above, only the network name that cannot be found becomes \\localhost\/home/bsw2k .
Also, 'home' is also the workgroup name on the W2K machine.

I have an smb user named bsw2k on this red hat machine with the same password as the bsw2k user on the W2K machine.

Here's my /home directory:
Code:

[root@localhost samba]# ls -l /home
total 16
drwx------  43 bsl1    bsl1        4096 Oct  4 19:48 bsl1
drwxrwxrwx    3 bsw2k    bsw2k        4096 Oct  5 13:35 bsw2k
drwxr-xr-x    2 root    root        4096 Oct  3 15:17 samba
drwx------    3 slacker  slacker      4096 Sep 17 15:18 slacker

Here's the file I have in the bsw2k directory:
Quote:

[root@localhost bsw2k]# pwd
/home/bsw2k
[root@localhost bsw2k]# ls -l
total 4
-rwxrwxrwx 1 root root 5 Oct 5 13:35 test.txt
I chmod'ed the bsw2k with 777, to no effect.

Doesn't there have to be a 'mount' for the bsw2k directory somewhere? I know there does with nfs, but can't remember with samba and don't see anything about it (yet) in this red hat 8 bible.

thanks...

david_ross 10-05-2003 02:13 PM

The share names shoule be:
[test]

not:
[/home/bsl1/test]

The path variable decides where the files are kept.

itsjustme 10-05-2003 02:30 PM

Cool. Thanks.

That worked. Another hurdle cleared. [as he looks down the track and sees other hurdles trailing off to the horizon] ;)
Quote:

[test]
comment = samba test directory
path = /home/bsl1/test
hosts allow = 192.168.1. 127.0.0.

[bsw2k]
path = /home/bsw2k
read only = No
hosts allow = 192.168.1. 127.0.0.
I wonder why swat did that.

david_ross 10-05-2003 02:52 PM

No idea. to be honest I don't like swat or webmin modules for smb.conf - they tend not to support everything and caues problems with what they can do. I find it much easier to edit the config by hand. It isn't complicated and most of the time you can just copy a previous share definition.

itsjustme 10-06-2003 09:52 AM

Well, looks like I only got one leg over the hurdle. This morning when I fired up these 2 computers, the red had samba machine first and the W2K machine second, and I click on My Network Places on the W2K machine, I have an icon for 'bsw2k on Bsl1', but when I click on it, I get a dialogue that says:

Incorrect password or unknown username for: \\Bsl1\bsw2k
Connect as:
Password:

Following the Red Hat 8 Bible, I set up the user name for bsw2k on the red hat box to match the username and password on the red hat machine. However, using bsw2k and the password only reproduces the dialogue above. I tried using the bsl1 username and password, same thing. Also when I tried to use root and the root password.

Any more ideas?

thanks...

itsjustme 10-06-2003 07:45 PM

thump - back to the first page... :D

In the mean time, I am trying to discover a solution through some of the documentation I have come across, but, man, some of it is just tedious. Is there a samba howto that has like a test setup in it for a simple linux to w2k network, such that it doesn't ask you about lmhosts and wins and what not? Where it just takes the linux box and the w2k box and says - ungawaw!!! do this (including any assumptions it wants to make about lmhosts and wins, etc)!! voila!! There's you test samba system and there's your linux directory on your w2k machine and here's your w2k directory on your linux machine?
I don't know if I want to use lmhosts or wins. It's just 2 computers, no big thing. Let samba control it all...

(disclaimer: I'm still not back to my old self from some medication I recently had to take. My concentration level is off.)

david_ross 10-07-2003 12:49 PM

Sorry for not getting back to you yesterday I must have missed the reply to post alert.

I had a frein with the same problem after using swat. My solution was to delete the smbpasswd file then re-add the samba users with smbadduser.

itsjustme 10-07-2003 04:45 PM

Well, dang. I renamed the smbpasswd and deleted bsw2k out of the passwd file. I tried then to add it back, but got some errors or warnings I forgot to capture. So, I just edited the bsw2k line back into the passwd file.
Then, following the red hat bible I did:
cat /etc/passwd | /usr/bin/mksmbpasswd.sh > /etc/smba/smbpasswd

(Edit: note - there isn't an smbadduser on my red hat box.)

I was then gonna use swat just to restart smbd and nmbd, but now I'm getting: The connection was refused when attempting to connect localhost:901 .

In the past, and probably now also, this is where I would reformat and reinstall... :scratch:

Uh... wait a sec... I am really confused, but no more so than normal ;) . I just checked the My Network Places on the W2K machine... and there is my Bsl1 machine and there are the folders now!?!?

Gotta trudge through some more documentation and just follow the WTF stack I reckon to try and figure out why it seems to be working.


All times are GMT -5. The time now is 04:54 PM.