LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 08-16-2003, 12:59 PM   #1
Da_Quest
Member
 
Registered: Feb 2003
Posts: 49

Rep: Reputation: 15
How do I make a shared folder under RH?


I hope this is a simple question. I'm was able to get Samba to see my server (WIn 2000) and all the other workstations (XP) in my network. Plus all network folders. The problem i'm having is getting a shared folder/drive/anything to be seen by any other workstation and my RH computer. When I click on the computer icon for my RH box with in RH Network Servers, I get this error.

Couldn't display "smb://myRHcomputer/", because no host "myRHcomputer" could not be found. Check that the spelling is correct and that the your proxy settings are correct.

I downloaded the latest Samba. I think this is why I am able to see my other pc's.

Please help, looking for the quick fix, yea right.....
 
Old 08-16-2003, 02:32 PM   #2
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
I am not following... ... or maybe I am just to sleepy

On which computer (win2000, winXP or Redhat) is the shared directory located ?
And which computer (win2000, winXP or Redhat) are you trying to connect to that shared folder ?

If your shared directory is on RH, post your smb.conf
 
Old 08-16-2003, 05:32 PM   #3
Da_Quest
Member
 
Registered: Feb 2003
Posts: 49

Original Poster
Rep: Reputation: 15
Thank you for replying. I would like to create the shared folder on the Red Hat box and be able to connect to it from XP/windows. In Windows I have to create a shared folder in order to see any thing over the network. I don't know how to explain it in Linux.
 
Old 08-16-2003, 06:36 PM   #4
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
Which version of RedHat are you using ?

First, is samba running ?
To find out, you can use the Service Configuration GUI.
Or
at the command line, type: service smb status

In the samba configuration file (/etc/samba/smb.conf), there are examples of shares.
 
Old 08-16-2003, 07:53 PM   #5
Da_Quest
Member
 
Registered: Feb 2003
Posts: 49

Original Poster
Rep: Reputation: 15
I'm running RH 9. I tried to do service smb status from a command line and it only told me "bash: service: command not found". Do I have in be in a certain directory? I was able to fine it in the Services Configuration and not it was not running. I check it and started the service on it. Do I need to start anything else? I'm rebooting now. Not sure if I really need to reboot or not...
 
Old 08-16-2003, 08:10 PM   #6
jisse
Member
 
Registered: Jul 2003
Location: netherlands
Distribution: rh/debian
Posts: 43

Rep: Reputation: 15
Hi Da-Quest,
I can see from your click-attempts that you're pretty much a newbie when speaking of Linux. First of all, clicking around in the desktop environment you're running is exactly what most Linux users don't do. The power of Linux is that it is developed from command-line programs (the UNIX tradition) and that the graphical environment lays on top of that.

So, I can't help you with "computer icons" and such. Sorry.

If you want to share files through the Samba protocol (smb), you'll first need to make sure the daemon is running. Do a "ps aux" and check if among the processes listed is a "smb" process.
user $ ps aux | grep smb
If there is, that's good. If it is not start it:
root # /etc/init.d/smb start

Now, you probably have no idea if you're sharing any files. Samba is configured in /etc/samba/smb.conf. It gives indeed some good examples, as well as having some defaults. If the smb.conf shows for instance an entry for "homes" or something, you're probably sharing already your home directory.

Now you should be able to see at least the computer name out of Network Neighbourhood from Windows 2000 or XP.

Any more problems? Just report. But make sure you try the command-line tools, before doing the same thing in a graphical environment. It could always be a bug of the graphical software you're using.

cheers
jisse
 
Old 08-16-2003, 08:20 PM   #7
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
To use the service command, you have to be root.

No, you do not need to reboot.
The Service Configuration GUI allows you to start, stop and restart services.
When you check it, it means that the service will be activated when the computer boots up.

To configure samba, you can use the new GUI tool that is available in RedHat 9.
At the command line, type: redhat-config-samba
Or it is in the menu, go to System Settings, Server Settings and click Samba Server.

Don't forget to restart the Samba service after making modifications.
 
Old 08-17-2003, 12:35 AM   #8
Da_Quest
Member
 
Registered: Feb 2003
Posts: 49

Original Poster
Rep: Reputation: 15
Yea, I'm a noob, somebody shoot me....... The redhat-config-samba works great. I can see all of my Windows pc from Red Hat 9. I also can see the Red Hat pc from Windows. What I can't see are any of the shared folders on the Red Hat pc when going into Network Server. I can see the Windows shared folders from Red Hat. Let me try and explain it this way.

step 1 - I click on the Red Hat
step 2 - I click on Network Server
step 3 - The GUI shows my domain and I click it
step 4 - The GUI then shows all my computers on the network
step 5 - I click on one of the Windows pc ( it works ) can see all shared folders
step 6 - I click on the Red Hat pc ( it does not work ) and get an error
step 7 - The error I get is ( couldn't display "smb://myredhat/", because no host "myredhat" could be found. Check that the spelling is correct and that your proxy settings are correct.
step 8 - I'm a noob
step 9 - I have no idea where to look and what to do about the proxy settings.
step 10- I'm a super noob

Basically, I can see Windows shared folders from Red Hat 9 under Network Server. I just can't see Red Hat shared folders from Network Server or from any Windows pc. Even though the Red Hat pc shows up in Network Places under Windows.

The error I get when I click on the Red Hat pc from with in Windows is "\\myredhat is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permission"
The network path no found.

I still say Linux is a stronger OS just a little hard to understand.

PS. What do I type to get my smb.conf and what directory do I need to be in?

Last edited by Da_Quest; 08-17-2003 at 12:42 AM.
 
Old 08-17-2003, 07:20 AM   #9
jisse
Member
 
Registered: Jul 2003
Location: netherlands
Distribution: rh/debian
Posts: 43

Rep: Reputation: 15
Hi Da_Quest,
Now we we now a little bit more. Great!

First your last question: smb.conf. Under RedHat it is located under /etc/samba. You should use a text editor to access it. Probably you're not yet used to the more esoteric editors like "vi" (you should though). Just use any editor from out of the program menu.

In your first post you mentioned a hostname called "myRHcomputer" but in your last post it was "myredhat". What is your hostname? Type "hostname" from the command-line to find out. If it is something different, type in one of the browsers you got on the GUI the URL again: smb://hostname/. Any luck?

Also be careful that Windows 2000 has sometimes strange reactions when a combination of NetBIOS and DNS is used. Make sure the hostname and IP address of your RedHat machine are also known under Windows. Easiest to check it with a ping from Windows of the RedHat hostname. If this is wrong, the lines below are not of use.

If "myredhat" is showing up in Network Places under Windows, you can be sure that Samba is running and functioning. But if you get the message that it is not accessible it could be that the file permissions used are not right.

Start editing /etc/samba/smb.conf. Make sure there is an entry like this one: "encrypt passwords = yes". Add to make sure your NetBIOS name as well: "netbios name = myredhat". Add for start a section like the one below. If there is one already, don't bother changing it.
[homes]
browseable = no
writable = yes
valid users = %S
This can probably can be done as well from the Service Configuration GUI.

For any user accessing Samba shares there needs to be a corresponding user in Samba's configuration. So, if you connect as Administrator from Windows to Linux, Linux has to know about a Administrator user. If you have problems with this (that means: you get a password prompt but can't login) you're best off posting another thread.

jisse
 
Old 08-17-2003, 04:48 PM   #10
Da_Quest
Member
 
Registered: Feb 2003
Posts: 49

Original Poster
Rep: Reputation: 15
Jisse Hello,

Here is what I found.

host name = workstation-03

guest ok = yes
guest account = quest
security = DOMAIN
encrypt passwords = yes
password server = noroot
dns proxy = no

[homes]
comment = Home Directories
browseable = no
writeable = yes
valid users = %S
create mode = 0664
directory mode = 0775

I don't know how to edit this if I need to.

Please don't give up on me. I'll we share every thing I learn to help other. To my understanding that's what it is all about.

PS. I can see the Red Hat pc within Window, but I can't ping it by name in Windows. Question? How do I ping from Red Hat? I type: ping hostname from a command prompt to ping in Windowes.

Last edited by Da_Quest; 08-17-2003 at 04:53 PM.
 
Old 08-17-2003, 05:10 PM   #11
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
Pinging by name may not work, because you may not have setup resolving Name to IP.
To ping in Linux:
Code:
ping ip_address
Is that your complete smb.conf file ?

Also, have you created users (or at least the guest user quest)
Type: redhat-config-users

When you have created a Linux user, you need to created the equivalent Samba user.
Type:
Code:
smbpasswd -a myLinuxUser
 
Old 08-17-2003, 05:37 PM   #12
jisse
Member
 
Registered: Jul 2003
Location: netherlands
Distribution: rh/debian
Posts: 43

Rep: Reputation: 15
We've now seen three hostnames of your computer: "workstation-03", "myredhat" and "myRHcomputer". Wouldn't it make sense to stick to one hostname?

If you type in the commandline "hostname" the output should be the same name as defined in smb.conf. If it is not, open a text editor to change /etc/samba/smb.conf to have "host name = " followed by your real hostname.

How to use a text editor? Well, a good start would be to get into Linux more and read some of the HOWTOs. But to solve your problem right away: We Don't Care What Kind Of Text Editor You Use. So "Text Editor" = "Word Processor" = "Office Suite". You have to be root though to edit the file.

On your Windows machine, start a window and type in the Address Bar "\\xxx.xxx.xxx.xxx" where the xxxs represent your IP address. Any luck?

If you're not using DNS inside your little network, maybe it is a good idea to do so. Maybe your modem supports an easy to configure DNS table? If DNS is not an option or takes too much time, in Windows edit a file called lmhosts.conf (add your real RH hostname and IP address) and import it into the Properties of your network interface.
 
Old 08-17-2003, 06:22 PM   #13
Da_Quest
Member
 
Registered: Feb 2003
Posts: 49

Original Poster
Rep: Reputation: 15
Nathieu,

Pinging in Linux by typing ping 192.168.1.11 works fine.

I don't know if that is all of my smb.conf, I try not to put ever thing you don't care to see, but I will post everything after this one.

I have a user by the name quest


Jisse,

Sorry about the confusion on the host name. When I type hostname it shows workstation-03.. When I ping the IP I get this: 64 bytes from 192.168.1.11: icmp_seq=1 ttl=64 time=0.049 ms.

Yes I do have a user called quest.

\\192.168.1.11 did not work under Windows or Red Hat

I have a DNS Server running on my Windows 2000 Server

Last edited by Da_Quest; 08-17-2003 at 06:45 PM.
 
Old 08-17-2003, 06:33 PM   #14
Da_Quest
Member
 
Registered: Feb 2003
Posts: 49

Original Poster
Rep: Reputation: 15
guest ok = yes
guest account = quest
security = DOMAIN
encrypt passwords = yes
password server = noroot
dns proxy = no

[homes]
comment = Home Directories
browseable = no
writeable = yes
valid users = %S
create mode = 0664
directory mode = 0775

; [netlogon]
; comment = Network Logon Service
; path = /usr/local/samba/lib/netlogon
; guest ok = yes
; writable = no
; share modes = no

;[Profiles]
; path = /usr/local/samba/profiles
; browseable = no
; guest ok = yes

[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
# Set public = yes to allow user 'guest account' to print
printable = yes

;[tmp]
; comment = Temporary file space
; path = /tmp
; read only = no
; public = yes

;[public]
; comment = Public Stuff
; path = /home/samba
; public = yes
; writable = yes
; printable = no
; write list = @staff


;[fredsdir]
; comment = Fred's Service
; path = /usr/somewhere/private
; valid users = fred
; public = no
; writable = yes
; printable = no

;[pchome]
; comment = PC Directories
; path = /usr/local/pc/%m
; public = no
; writable = yes


;[public]
; path = /usr/somewhere/else/public
; public = yes
; only guest = yes
; writable = yes
; printable = no


;[myshare]
; comment = Mary's and Fred's stuff
; path = /usr/somewhere/shared
; valid users = mary fred
; public = no
; writable = yes
; printable = no
; create mask = 0765

[home]
path = /home/quest/
writeable = yes
comment = shared drive on Red Hat
guest ok = yes
 
Old 08-17-2003, 09:33 PM   #15
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
Do you want Samba to be a Domain Controller ?
If no, change security = DOMAIN to security = user
and remove the password server = noroot line.

You will need to add the following lines in the global share.
Code:
workgroup = your_WorkGroup
netbios name = your_hostname
smb passwd file = /etc/samba/smbpasswd
After making these modifications, you need to restart the Samba service.

Don't forget to add your user to the Samba user list.
Code:
smbpasswd -a quest
You can now connect to your RedHat PC from windows by using your hostname.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I mount a Windows XP shared folder? mlse Linux - Networking 3 09-28-2006 07:36 AM
shared pear folder ciscohead Linux - Software 0 07-25-2005 11:42 AM
shared folder varun_saa Mandriva 1 06-07-2005 02:42 AM
Cant add folder into my shared folder? amer_58 Linux - Newbie 2 04-03-2005 12:35 PM
deleting a shared folder aymbpc Linux - Newbie 3 09-23-2003 07:01 PM


All times are GMT -5. The time now is 08:47 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration