LinNeighborhood problems are not what we were discussing as this is
really a completely separate issue and program.

LinNeighborhood and KDE (Lisa/ReLisa) support are completely different
beasts.

One requires the other, but the latter two have their own quirks. 

---

BTW: The SMBMNT message is correct, as a USER you don't have rights to
mount volumes explicitly unless you "SU" before running
LinNeighborhood...

You should edit the entry for LinNeighborhood so it "SU's" for you...

Or better yet, see the closing below...

---

First you have to start by getting Samba up and running correctly.

As I've mentioned this is relatively easy to do. And extensively covered
in many detailed FAQ's & DOCS...

Here is a quick Howto... As root do the following...

1) Make sure that your Winblows machines can ping the Linux host
computer.
2) Make sure that your Winblows machines can ping the Linux host
computer by FQN...

I.E. 

"ping linuxbox.mydomain.com"

Should work.

If not you'll need to deal with DNS which is a different kettle of fish
and entirely up to you.

You could set up your Linux box to resolve DNS queries for your
Winboxes.

You could edit c:\windows\hosts to include the name of your Linux box
and shortname...
Etc... It's up to you. 

But the Windows boxes need to know what the HOSTNAME & DOMAIN NAME your
Linux box is or you'll get nowhere.

3) Decide on a workgroup name for ALL machines on your private network.
You must use the same workgroup name for both Linux and Winblows.

4) Make sure that your Windows boxes have their networking settings set
up properly

5) Make up your mind as to if you want Server/user style Networking or
Domain Networking which NT prefers. Again your choice.

6) If the latter, do you have a PDC on your network? Don't know what
that is?
Then you probably don't. Decide if you want Linux to act as a PDC. The
choice is yours.

PDC's simplify logins and NT services, but take a little more effort on
your part.

Notice that thus far this is all Winblows stuff, not Linux!

7) Make sure that Linux can ping your Winboxes by short and long
names...

I.E. 

"ping mybox1.mydomain.com "

"ping mybox1"

"ping localhost"

Should all work. Again if this fails fix your networking and DNS...

If you feel lazy... Just use /etc/hosts entries...

8) Locate your SMB.CONF file...

It will either be in /etc or /etc/samba NOT BOTH!

9) Edit your SMB.CONF file

Here we go:

Make sure these entries exist ONCE in your configuration file...
Change as needed..

[global]

#
# The following is the name of the Winblows Workgroup/domain
#
        workgroup = MYWORKGROUP

#
# How Netbios knows it's name as, this should be the SAME as your
SHORTNAME
# for your Linux box, and known by your Windows boxes for ease, as I've
mentioned
# before...
# I.E. "ping mybox" from Winblows should work...
#
        netbios name = MYBOX

#
# The next line is not needed, but can be used to resolve problems with
naming...
#
        netbios aliases = LinuxBox

#
# The following line controls what shows up in the Windows "details"
when you browse 
# the network in explorer... I.E. the comment field.
#
        server string = Samba Server on Linux Bluebox

#
# While you don't have to set the following it's a great idea to do so.
#
# The line below says that this machine will participate on the Windows
Network
# via the local (ethernet) interface with an IP of 10.0.0.16. The "/8"
tells Samba
# only to respond to hosts with 8 significant lower bits... Or 255
hosts...
# This in spite of the fact that a 10.0.0.0 LAN is a CLASS A protected
network.
# (Usually you use 10.0.0.16/24 when talking about this lan...)
#
# The 127.0.0.1/24 permits Samba to talk to "itself" so you can test
things locally...
#
        interfaces = 10.0.0.16/8 127.0.0.1/24

#
# The next line determines the type of security you are going to use...
# If you want Samba to act as a PDC/Login server or participate in a
network
# with an existing PDC... The next line would need to read "domain"
instead.
#
        security = USER

#
# Should be set to YES for later versions of Samba
#
        encrypt passwords = Yes

#
# I've commented out these two to prohibit ANYONE from getting access to

# some samba resources without first logging in.
# Don't expect that by merely uncommenting them, that you'll get samba
up.
# as more is required...
#
#       map to guest = Bad Password

#       null passwords = Yes

#
# Leave the following uncommented in the smb.conf file
#
        passwd program = /usr/bin/passwd %u

        passwd chat = *New*UNIX*password* %n\n
*ReType*new*UNIX*password* %n\n *
passwd:*all*authentication*tokens*updated*successfully*

        password level = 8

        username level = 8

        unix password sync = Yes

        log file = /var/log/samba/log.%m

        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

        add user script = /usr/sbin/adduser -s /bin/fals

        delete user script = /usr/sbin/deluser %u

        logon script = netlogon.bat

#
# Since I'm using "user" style logins I've disabled domain logins
# to this machine
#
#       domain logons = No

        os level = 33
#
# If there are not NT PDC's or Domain servers on your network, merely
workstations
# set the next line to Yes
#
# This controls if this machine will become the "browse master". I.E.
the machine
# that hosts the list of sharable resources on your network.
# If Linux stays up all the time, then this is the machine you want to
use...
#                                                           
        preferred master = Yes

        domain master = Yes

# 
# The next line tells Samba which machine is going to be responsible for
authorizing
# logins... Not needed for "user" level
#
#       password server = PDC

#
# Turn on Wins support so that brain damaged Winblows machines can
figure things out
#

        wins support = Yes

#
# Automatically sets up the following users when they attach...
# If you've configured this later in the file...
#
        auto services = user1 user2              
#
# The next line defines a "fall thru" share...
# If the user is unknown they can use the "reference" shares instead...
#       default service = reference

#
# This one is important.
# It determines to which machines Samba "advertises" it's presence to..
# In this case I want to only send out advertisements to 254 machines on
# my protected subnet, and no others..
#
        remote announce = 10.0.0.255

#
# This gets Samba to synchronize what it sees with other "browse master"
computers
# on your network, to avoid some machines not seeing some of the
shares...
#
        remote browse sync = 10.0.0.255

#
# For security I've dropped the PCGUEST account...
# If you want to use it, you'll have to add a Linux user by the same
name..
#       guest account = pcguest


# Obvious
        admin users = su admin administrator

#
# Here I've dropped protections calling all shares by DEFAULT writable..
# This means that users can write to anything they can attach to...
# BIG security hole, but on my protected LAN I don't care..
#
        writeable = Yes

#
# This defines which machines are permitted access.
# You could define which IP's are permitted in by specifying them all
here
# or you could do what I did and only specify the portion of the IP
(range) I'm
# permitting... I.E. 10.0.0.1 thru 10.0.0.254 & 127.0.0.1
#
        hosts allow = 10.0.0. 127.0.0.1
#
# For CUPS...
#                                         
        printcap name = lpstat  
        load printers = yes     
#
# Sets up default printing...
#
# Most of this directly from the example file..
#
[printers]

        comment = Samba Printers

        path = /tmp

        printing = cups

        print command = lpr-cups -P %p -o raw %s

        comment = All Printers

        browseable = yes

#
#       to allow user 'guest account' to print.

#        guest ok = yes

#
#
#       writable = no

        printable = yes

#       create mode = 0700

# =====================================

# print command: see above for details.

# =====================================

#
# print command = lpr-cups -P %p -o raw %s 
# using client side printer drivers.


# print command = lpr-cups -P %p %s 
# using cups own drivers (use generic PostScript on clients).


        lpq command = lpstat -o %p

        lprm command = cancel %p-%j


# Point of frequent confusion:
# All of the above deals with logins, printers, etc.
#
# The following are the "SHARES" that Samba publishes.
# Unlike Winblows, you have very FINE control over these shares...
#
# The brackets denote the share name..
#
# In the second case the share "admin" would be available or mappable to
# as \\mybox\admin from Winblows get it?
#
#
# This sets up the location of the default "home" directories for anyone
allowed in
#
# I've allowed every machine on my 10.0.0.0 network access to this,
provided
# That Samba finds their username in the xgrp group... Which you can
define yourself
#
[homes]                                       
        comment = Home Directories            
        path = /home                          
        username = @xgrp                      
        write list = @xgrp                    
        guest ok = Yes                        
        hosts allow = 10.0.0.0                

                                              
[admin]                                       
        comment = Administrator Directories   
        path = /root                          
        username = @xgrp admin opjose    
        write list = @xgrp admin opjose  
#       only user = Yes                       
#
# Here's a big security hole...
#
        guest ok = Yes           
#
# The following is used by DOMAIN logins and is not needed otherwise...
# Though uncomment this for safety
#
[netlogon]                                  
        comment = Network Logon Service     
        path = /home/netlogon               
        guest ok = Yes                      
        share modes = No                    
#
# This share is writeable and usable by ANYBODY...
# It's a great way to test samba too... So leave as is.
#
# NOTE: Make sure that your /tmp directory is world writable in Linux
# for this to work... You can change things later...
# Note:
# Samba "bows" to Linux file/directory protections & ownerships...
# so if the rights are not correct or sufficient, you may have
# everything set up properly, but samba will still fail!
#                                            
# Do a "chmod 777 /tmp" to give everything rights to the TMP directory.
# remember to set things back after testing...
#
[tmp]                                       
        comment = the garbage dump          
        path = /tmp                         
        create mask = 0777                  
        guest ok = Yes                      
#
# The "fall thru" share we saw above..
#                                            
[reference]                                 
        comment = Samba LAN manager         
        path = /tmp                         
        guest ok = Yes                      
#
# Some "user" directories/shares...
#
# Note /home/games, etc. must exist
# and it must be owned and writable by the 
# Linux account of the same name...
# 
# Huh?
# More later...
#
[games]                                         
        comment = Home Directories              
        path = /home/games                      
        username = @xgrp                        
        write list = @xgrp                      
        guest ok = Yes                          
        hosts allow = 10.0.0.0                  
                                                
[sabrina]                                       
        comment = Home Directories              
        path = /home/sabrina                    
        username = @xgrp                        
        write list = @xgrp                      
        guest ok = Yes                          
        hosts allow = 10.0.0.0                  
[mylogin]                                       
        comment = Home Directories              
        path = /home/mylogin                    
        username = @xgrp mylogin                       
        write list = @xgrp mylogin                     
        guest ok = No                          
        hosts allow = 10.0.0.0


10) Now it's time to add Samba & Linux users...

While Samba CAN deal with Linux user accounts and vice versa, I'm going
to resort to the brute force approach which is easier for the newbie...
 
Winblows passes whatever USERNAME and PASSWORD it saw when you first
logged into Windows Networking to Linux whenever you attempt to access a
Samba share...

Let me repeat...

Winblows passes whatever USERNAME and PASSWORD it saw when you first
logged into Windows Networking to Linux whenever you attempt to access a
Samba share...

Therefore these same usernames and passwords should exist as valid Linux
accounts
(I KNOW you more experienced people... I'm simplifying...)

So add LINUX login accounts with the SAME passwords you use in Winblows
to your Linux box...

Having done that (depending upon the samba version) do a

"smbadduser user1"

For each Linux login account you are creating... 
You should be prompted for a password for each.

11) Test your SMB.CONF file... By typing

"testparm"


12) Now it's time to restart Samba to permit it to read the new
configuration...

Type 

"service smb restart"

13) Let's see if it's awake yet.

Type

"smbclient -L mybox -U admin"

Samba should ask you for a password for the account "admin", NOT THE
SHARE "admin" which are two different things!

Use the password you have added, and you should see a display of all the
shares we defined before in the smb.conf file.

Do you get a bad passwd message? You didn't set up the SAMBA user
account properly.
Use "smbpasswd admin" to fix the password for this account...

14) Go to a Winblows machine and log in using the same username and
password that worked above.

15) In explorer click on "tools/map network drive". (Don't see this, DO
NOT use the network browser YET, instead change your folder options so
that the MAP drive Icon/entry appears... Then proceed as indicated...)

In the Map Network drive, select a Drive letter in the upper box, then
type in
\\mybox\tmp

You should then be presented with the /TMP directory of your Linux box!

Try the same with \\mybox\admin

Do you get this far?

16) Yes? Great go to network neighborhood and browse the network.
Hopefully your Linux box will now appear too. If not you still have some
minor browser problems which I'll not go into resolving here...

---

Notice that most of this involved testing and setting up the Winblows
machines...

Linux entailed nothing more than editing smb.conf and adding the
users... 

That is provided you had your Linux machine set up properly to begin
with.

Most people jump right into setting up Samba, without having first
properly configuring their hardware/software... 

---

If you've gotten this far, you'll be also able to get Samba & Winblows
shares via the file browser in KDE... This entails setting up lisa &
reslisa...

However there is a bug in 8.0 which prevents this from working
properly...

The KDE control panel puts the configuration files in ~/.kde/apps or
something like that... ("locate reslisa" and "locate lisa") as .lisarc
and .reslisa rc.

KDE MS$ Browsing will not work until you correctly configure these files
in the KDE Control Panel and copy them to your home directory instead...
(they are hidden files)

Once you do this and re-login to KDE you'll be able to see the Winblows
shares from the KDE file browser WITHOUT needing to mount them in
LinNeighborhood.

Lisa/ResLisa use the credentials you specify in the KDE control panel
when it talks to the Winboxes using MS Networking...

Ok, you own me $240.00.

Where do I send the bill? ;-)

-JMS
 


Reply via email to