LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 12-16-2003, 11:25 PM   #1
gvaught
Member
 
Registered: Sep 2003
Location: MidWest
Distribution: Debian GNU/Linux 8 (jessie)
Posts: 199

Rep: Reputation: 30
Question Question about /etc/hosts and Samba


Good evening all!

I have finally got Samba doing a wonderful job of acting as a nice little file server, with private, public and read-only shares. It is wonderful. The only problem I have now is that my Win2k box is a dual-boot with RH8. I can do the shares just fine on Win2k, but when I reboot to RH8 I'm not so sure.

I am using the same IP address (OK? no-no? what's the take on that?) but a different host name (again, is this not good?). I want to be able to use the same private share regardless of which machine I'm logged into, or which OS. Do I need to use different host names with different IPs and the same host name when using the same IP? Or am I OK using one IP with two different host names on the same box?

I know I'm making this harder than it has to be, but this is one of the reasons I turned to Linux in the first place - I want to learn. If I can figure out enough wrong ways to do things, I feel I'll be much better off when I finally get around to what works best for me.

 
Old 12-17-2003, 12:16 AM   #2
ugob
Member
 
Registered: Nov 2003
Distribution: RH, Fedora, Debian, Knoppix
Posts: 436

Rep: Reputation: 31
I think it should be ok with the same IP. Maybe you should give us more explanations about your setup.
 
Old 12-17-2003, 12:29 AM   #3
gvaught
Member
 
Registered: Sep 2003
Location: MidWest
Distribution: Debian GNU/Linux 8 (jessie)
Posts: 199

Original Poster
Rep: Reputation: 30
I'm not sure what else to explain. I have set up Samba on my server (working great with Win2k) and the hosts file reads thus:

127.0.0.1 myserver
a.b.c.d myserver
a.b.c.e winbox
a.b.c.e rh8box
etc...

Aside from that, it's a pretty simple network: 5-port switch, one of which is my firewall to the 'Net. It's been p2p up until now. The only thing I've consciously set up on my server is Samba. I have another serverbox I'm going to use for hosting web stuff. My file server is running Slackware 9.1 (since so many people rave about it), using Samba 3.0.1. I want to set it up as a PDC, but I know jack-squat (lives in a van, down by the river) about domains, groups and the like, so I'm learning as I go. I hope.

If there's anything I can pass along to help, let me know.
 
Old 12-17-2003, 12:35 AM   #4
ugob
Member
 
Registered: Nov 2003
Distribution: RH, Fedora, Debian, Knoppix
Posts: 436

Rep: Reputation: 31
That is a good start,

You'll share your files with which computer? What is important to describe here is your plan: how will your computers will interact? What services will be offered by and used by which computer, especially for samba.

And what is the problem exactly. Have you tried it already? Errors? logs?
 
Old 12-17-2003, 12:55 PM   #5
gvaught
Member
 
Registered: Sep 2003
Location: MidWest
Distribution: Debian GNU/Linux 8 (jessie)
Posts: 199

Original Poster
Rep: Reputation: 30
Okay, what I'm trying to do is set this up so that I can share //myserver/home/myfiles with my logon account, regardless of where I'm logged on. If that's not possible, the next acceptable scenario is that I can share //myserver/home/myfiles with my dual-boot system, regardless of whether I've loaded Win2k or RH8. As I stated originally, I've got this working quite well for my Win2k systems. What I don't know how to do is get it working for RH8.

I guess my big question is do I need to load a Samba server on my RH box, or will the Samba client allow me access to my file server (given that permissions are all correct)? I'm pretty much stuck at this point. All of the how-to's that I've found on-line are not real helpful in gaining any understanding. I did follow through an "Unofficial Samba How-To", which got me up and running to this point, connecting from Win2k. But when it came to connecting to my fileserver from a Linux box, the instructions pretty much lost me. Kinda like he expects you to know what you're doing at that point. I'm still learning.

So, just to make sure I've answered the questions:
I have a file server running Samba server.
I have configured it, and my Windows computers, to work as expected.
One of my Windows computers is dual-boot with RH.
I would like to use a different host/NetBIOS name for each OS on this box, but still use the same IP address.
I want to set up RH to use Samba to access my "network drive" or mountpoint on my file server.
I really don't know where to start setting up RH to accomplish this.
 
Old 12-17-2003, 01:24 PM   #6
ugob
Member
 
Registered: Nov 2003
Distribution: RH, Fedora, Debian, Knoppix
Posts: 436

Rep: Reputation: 31
Very clear now !

The only thing you need now is to setup your RH box to mount your remote drives right?

you can do that with the mount command, for individual users, you can put the mount command in a script initialization file, such as .bashrc or something like that.

You can use also fstab, but this mounts the drives for everyone. The mount command is tricky for that, and I'll try to find the exact syntax for you.
 
Old 12-17-2003, 01:48 PM   #7
gvaught
Member
 
Registered: Sep 2003
Location: MidWest
Distribution: Debian GNU/Linux 8 (jessie)
Posts: 199

Original Poster
Rep: Reputation: 30
GREAT!! I was beginning to think I was becoming a source of annoyance. Thanks for hanging in there with me.

I know there are logon scripts that run (or can run) at startup. I'm pretty ignorant. I'm guessing they're kinda like .bat files for DOS (particularly autoexec.bat). Any advice on this subject?
 
Old 12-17-2003, 01:57 PM   #8
ugob
Member
 
Registered: Nov 2003
Distribution: RH, Fedora, Debian, Knoppix
Posts: 436

Rep: Reputation: 31
eheh, with a bit of guidance...

yes, there are logon scripts, look in your home directory for "hidden" file

you must use ls -a to see them, they start with a dot.

I'm not very familiar with the ones that work with X, though.

http://www.linuxquestions.org/questi...002/09/2/24953
http://lists.samba.org/archive/samba...er/051938.html
 
Old 12-17-2003, 02:31 PM   #9
gvaught
Member
 
Registered: Sep 2003
Location: MidWest
Distribution: Debian GNU/Linux 8 (jessie)
Posts: 199

Original Poster
Rep: Reputation: 30
Okay, I'm just trying to get the darned thing to mount. I can worry about automating it after I make it work manually. Here's my command and reward:

# mount -t smbfs -o username=******,password=******** //uther/public /mnt/netCommon
# 3361: tree connect failed: ERRDOS - ERRnosuchshare (You specified an invalid share name)

I have created the /mnt/netCommon directory on my local box. public is the share I have defined as EVERYONE can access it. I blanked out the username and password, since they're really irrelevant to making this work. Any suggestions?
 
Old 12-17-2003, 02:34 PM   #10
gvaught
Member
 
Registered: Sep 2003
Location: MidWest
Distribution: Debian GNU/Linux 8 (jessie)
Posts: 199

Original Poster
Rep: Reputation: 30
OH! Never mind. The share is pub not public. My bad. Now, on to automation...

 
Old 12-17-2003, 02:38 PM   #11
ugob
Member
 
Registered: Nov 2003
Distribution: RH, Fedora, Debian, Knoppix
Posts: 436

Rep: Reputation: 31
Excellent Keep going... when you've got the receipt, please post it, so I can save it somewhere... always a pain...
 
Old 12-17-2003, 02:44 PM   #12
gvaught
Member
 
Registered: Sep 2003
Location: MidWest
Distribution: Debian GNU/Linux 8 (jessie)
Posts: 199

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by ugob
Excellent Keep going... when you've got the receipt, please post it, so I can save it somewhere... always a pain...
Uh, receipt? Am I missing something? Please explain.

 
Old 12-17-2003, 02:53 PM   #13
ugob
Member
 
Registered: Nov 2003
Distribution: RH, Fedora, Debian, Knoppix
Posts: 436

Rep: Reputation: 31
Sorry... recipe (solution), not receipt. English is not my first language...

Btw, you're not a newbie anymoer
 
  


Reply



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
/etc/hosts.allow question GUIPenguin Linux - General 3 05-23-2005 08:51 PM
hosts probs on Samba, K_smolka Linux - Newbie 3 05-09-2005 06:56 PM
hosts.allow & hosts.deny question... jonc Linux - Security 9 03-05-2005 09:41 PM
samba-hosts allow problem? fowlerlfc Linux - Networking 2 07-09-2002 01:37 PM
/etc/hosts question viv Linux - Newbie 1 04-17-2002 05:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:56 AM.

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
Open Source Consulting | Domain Registration