LinuxQuestions.org
Visit the LQ Articles and Editorials section
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-07-2004, 03:18 AM   #1
ditch*
Member
 
Registered: Jul 2004
Posts: 50

Rep: Reputation: 15
Small thing: starting samba for the first time.


Heij!

I've recently switched to Mandrake 10.0 and I need to share some files over my university's LAN.

I ran some utility in the Mandrake Control Centre and it installed the following packages:

samba-client
samba-common
samba-server

all are version 3.0.2a

... Unfortunately there doesn't seem to be any README files, so here are the first two questions that come to my mind:

- how do I find out my computer's name?
- how do I view all the other computers connected to LAN?


Sorry for the silly questions.



Grisha.
 
Old 12-07-2004, 03:41 AM   #2
linux_terror
Member
 
Registered: Aug 2004
Location: Northbrook, Illinois
Distribution: CentOS-5
Posts: 311

Rep: Reputation: 30
Take a look at /etc/samba/smb.conf this is where all the information you are looking for is, your network name is whatever your hostname is, do

#hostname

workgroup and shares are defined in smb.conf

Hope this helps,
linux_terror
 
Old 12-07-2004, 06:38 AM   #3
ditch*
Member
 
Registered: Jul 2004
Posts: 50

Original Poster
Rep: Reputation: 15
Thanks!!

[grisha@localhost grisha]$ su
[root@localhost grisha]# hostname
localhost
[root@localhost grisha]#

-- Does this mean that when the others open their Network Neigbourhood windows, they will see my computer listed as "localhost"?

OK.
So what's the Linux version of Network Neighbourhood?
- Where do I go to see who is online and who is not?

Best,

Grisha.
 
Old 12-07-2004, 07:01 AM   #4
ditch*
Member
 
Registered: Jul 2004
Posts: 50

Original Poster
Rep: Reputation: 15
hmmm...

My flatmate couldn't find anyone named "localhost" on the network.

In fact, it looked like his computer called itself "localhost" as well.

 
Old 12-07-2004, 07:53 AM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 12,175

Rep: Reputation: 784Reputation: 784Reputation: 784Reputation: 784Reputation: 784Reputation: 784Reputation: 784
Some distros use localhost as a default hostname. localhost is the name associated with the ethernet local loopback device 127.0.0.1 which all TCP/IP configured computers will have. Add the option to the /etc/samba/smb.conf file:
netbios name = something

Change something as desired. So something will be displayed in network neighboorhood.

Use Mandrake Control Center services to configure samba to start at boot.
 
Old 12-07-2004, 08:19 AM   #6
gani
Member
 
Registered: Jun 2004
Location: Metro Manila, Philippines
Distribution: OpenBSD, Slackware, XP
Posts: 347

Rep: Reputation: 31
It should be defined in your /etc/hosts like this:

Code:
127.0.0.1    localhost.my.domain localhost
127.0.0.1    yourhostname.my.domain yourhostname
192.168.x.x  winhost1
192.168.x.x  winhost2
so on, so forth
With this you can just ping your remote windows machines via its hostname instead of their IPs.

In your /etc/samba/smb.conf, it is already defined by default under the [global] settings:

server string = Samba Server %v

and make sure that security = share is there to allow your windows machines to have full access to the share you will define under Share Definitions such as this:

===============Share Definitions==================
[ourdata]
comment = Central Data Folder
path = /usr/data
public = yes
read only = no
create mode = 0777
directory mode = 0777


Then put the appropriate directory permissions:

#mkdir -m 1777 /usr/data

or

#mkdir /usr/data
#chmod 1777 /usr/data

The "1" will add sticky bit so that the owner (the one that created) the files and directory has only the capacity to delete.

Issue testparm to test for errors in your smb.conf.

To test your samba server:

#smbclient -L localhost

This should list the share you defined and what host is the master browser and including your workgroup such as this:

Code:
obsd c:\># smbclient -L localhost
added interface ip=192.168.0.1 bcast=192.168.0.255 nmask=255.255.255.0
Password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 2.2.10]

        Sharename      Type      Comment
        ---------      ----      -------
        tmp            Disk      Temporary file space
        IPC$           IPC       IPC Service (Samba Server)
        ADMIN$         Disk      IPC Service (Samba Server)
        
        Server               Comment
        ---------            -------
        HOME
        MKTG
        OBSD                 Samba Server

        Workgroup            Master
        ---------            -------
        WORKGROUP            OBSD
Always restart your samba server whenever changes are made in smb.conf.

#kill -1 `cat /var/run/smbd.pid`

If you have lmhosts file in your windows boxes with a format like /etc/hosts, you can ping the mandrake box by using its hostname but without this, ping only using its IP address.

You should be able now to access your mandrake share through My Network Places or Network Neighborhood.

Hope that this helps.
 
  


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
thing to laugh at, the windows time watch blackman890 General 0 10-28-2004 08:56 AM
Compiling kernel for first time, unsure about 1 thing Nigh Unstoppabl Slackware 1 07-15-2004 05:23 AM
no signal when starting xorg for the 1st time (but the second time works fine) bungalowbill Linux - Software 0 06-04-2004 10:56 AM
LILO, it's time to get this thing working... EThitop Linux - Newbie 45 06-02-2004 11:38 PM
Starting Samba at boot time. Unknown_User Linux - Software 3 04-26-2003 04:30 AM


All times are GMT -5. The time now is 04:39 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration