Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 12-07-2004, 03:18 AM   #1
Registered: Jul 2004
Posts: 50

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


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:


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.

Old 12-07-2004, 03:41 AM   #2
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


workgroup and shares are defined in smb.conf

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

Original Poster
Rep: Reputation: 15

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

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

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


Old 12-07-2004, 07:01 AM   #4
Registered: Jul 2004
Posts: 50

Original Poster
Rep: Reputation: 15

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
Registered: Aug 2002
Posts: 18,082

Rep: Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506Reputation: 2506
Some distros use localhost as a default hostname. localhost is the name associated with the ethernet local loopback device 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
Registered: Jun 2004
Location: Metro Manila, Philippines
Distribution: OpenBSD, Slackware, XP
Posts: 348

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

Code: localhost 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==================
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


#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:

obsd c:\># smbclient -L localhost
added interface ip= bcast= nmask=
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
        ---------            -------
        OBSD                 Samba Server

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

#kill -1 `cat /var/run/`

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.


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 > Forums > Linux Forums > Linux - Networking

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

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