Find the answer to your Linux question:
Results 1 to 6 of 6
I did a search for this issue and couldn't find it, so if this has been asked a billion times please forgive me, but . . . Trying to run ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2006
    Posts
    18

    Cool SAMBA issue


    I did a search for this issue and couldn't find it, so if this has been asked a billion times please forgive me, but . . .

    Trying to run SAMBA to basically use my linux box as a file server over my small SOHO network. The Windows boxes can all see each other. The linux box can see all of the Windows boxes. But none of the Windows boxes can see the linux box.

    I checked the SAMBA config to make sure that the workgroup name is correct (it is), that there is a user for the Windows boxes to log in with (there is), and so on. Still nothing.

    Can anyone offer any assistance on this?

  2. #2
    Linux Guru AlexK's Avatar
    Join Date
    Feb 2005
    Location
    Earth
    Posts
    3,379
    Check out this howto

    Also, make sure that you can ping each box and temproarily turn off the firewall, or allow the SMB port to pass through the firewall.
    Life is complex, it has a real part and an imaginary part.

  3. #3
    Just Joined!
    Join Date
    Apr 2006
    Posts
    18
    Thanks. Got all that done, and now I'm halfway there but getting some odd flavors of weirdness.

    One of my Windows boxes can now see the linux box, access all of the shared folders, write files, read files, execute files, and everything. But when the linux box tries to access files and folders on that Windows box, I get asked for a username and password.

    On the other three Windows boxes, the problem is the opposite: the linux box can access all of their files and folders, but when the Windows boxes try to connect to the linux box, I get asked for a password for username "LINUXBOX/guest" (which is greyed out so I can't change the username). I have a group set up for username "networkusers" on the linux machine, and all logins are supposed to be forced to be that user, but that doesn't seem to be what's going on.

    Ugh.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru AlexK's Avatar
    Join Date
    Feb 2005
    Location
    Earth
    Posts
    3,379
    for your 1st problem, try entering a local username and password for that windows computer. Also, try setting the permission of that share on the windows computer so that everyone can write to it.

    for 2nd problem, can you post the global section of your smb.conf file. And have you added the necessary samba user and password ("networkusers", in your case)?
    Life is complex, it has a real part and an imaginary part.

  6. #5
    Just Joined!
    Join Date
    Apr 2006
    Posts
    18

    Do the samba

    Quote Originally Posted by AlexK
    for your 1st problem, try entering a local username and password for that windows computer. Also, try setting the permission of that share on the windows computer so that everyone can write to it.
    Strangely, that problem has spontaneously resolved itself. The linux box can now see all of the other computers and access their files just peachy. I didn't do anything. Weird.

    Quote Originally Posted by AlexK
    for 2nd problem, can you post the global section of your smb.conf file. And have you added the necessary samba user and password ("networkusers", in your case)?

    Here are the global settings:


    #======================= Global Settings =====================================
    [global]

    # 1. Server Naming Options:
    # workgroup = NT-Domain-Name or Workgroup-Name
    workgroup = TWILIGHT

    # netbios name is the name you will see in "Network Neighbourhood",
    # but defaults to your hostname
    # netbios name = <name_of_this_server>

    # server string is the equivalent of the NT Description field
    server string = LennyLinuxbox

    # Message command is run by samba when a "popup" message is sent to it.
    # The example below is for use with LinPopUp:
    ; message command = /usr/bin/linpopup "%f" "%m" %s; rm %s


    And here are the seccurity settings:

    # 4. Security and Domain Membership Options:
    # This option is important for security. It allows you to restrict
    # connections to machines which are on your local network. The
    # following example restricts access to two C class networks and
    # the "loopback" interface. For more examples of the syntax see
    # the smb.conf man page. Do not enable this if (tcp/ip) name resolution does
    # not work for all the hosts in your network.
    # hosts allow = 192.168.1. 192.168.2. 127.

    # Uncomment this if you want a guest account, you must add this to /etc/passwd
    # otherwise the user "nobody" is used
    # guest account = pcguest
    # Allow users to map to guest:
    map to guest = Bad User

    # Security mode. Most people will want user level security. See
    # security_level.txt for details.
    security = share
    # Use password server option only with security = server or security = domain
    # When using security = domain, you should use password server = *
    # password server = <NT-Server-Name>
    # password server = *

    # Password Level allows matching of _n_ characters of the password for
    # all combinations of upper and lower case.
    # password level = 8
    # username level = 8

    # You may wish to use password encryption. Please read
    # ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
    # Do not enable this option unless you have read those documents
    # Encrypted passwords are required for any use of samba in a Windows NT domain
    # The smbpasswd file is only required by a server doing authentication, thus
    # members of a domain do not need one.
    encrypt passwords = yes

    # The following are needed to allow password changing from Windows to
    # also update the Linux system password.
    # NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
    # NOTE2: You do NOT need these to allow workstations to change only
    # the encrypted SMB passwords. They allow the Unix password
    # to be kept in sync with the SMB password.
    ; unix password sync = Yes
    # You either need to setup a passwd program and passwd chat, or
    # enable pam password change
    ; pam password change = yes
    # passwd program = /usr/bin/passwd '%u'
    ; passwd chat = *New*UNIX*password* %n\n *Re*ype*new*UNIX*password* %n\n ;*passwd:*all*authentication*tokens*updated*succes sfully*

    # Unix users can map to different SMB User names
    ; username map = /etc/samba/smbusers

    # Using the following line enables you to customise your configuration
    # on a per machine basis. The %m gets replaced with the netbios name
    # of the machine that is connecting
    # include = /etc/samba/smb.conf.%m

    # Options for using winbind. Winbind allows you to do all account and
    # authentication from a Windows or samba domain controller, creating
    # accounts on the fly, and maintaining a mapping of Windows RIDs to unix uid's
    # and gid's. winbind uid and winbind gid are the only required parameters.
    #
    # winbind uid is the range of uid's winbind can use when mapping RIDs to uid's
    # idmap uid = 10000-20000
    #
    # winbind gid is the range of uid's winbind can use when mapping RIDs to gid's
    # idmap gid = 10000-20000
    #
    # winbind separator is the character a user must use between their domain
    # name and username, defaults to "\"
    # winbind separator = +
    #
    # winbind use default domain allows you to have winbind return usernames
    # in the form user instead of DOMAIN+user for the domain listed in the
    # workgroup parameter.
    # winbind use default domain = yes
    #
    # template homedir determines the home directory for winbind users, with
    # %D expanding to their domain name and %U expanding to their username:
    # template homedir = /home/%D/%U

    # When using winbind, you may want to have samba create home directories
    # on the fly for authenticated users. Ensure that /etc/pam.d/samba is
    # using 'service=system-auth-winbind' in pam_stack modules, and then
    # enable obedience of pam restrictions below:
    # obey pam restrictions = yes

    #
    # template shell determines the shell users authenticated by winbind get
    # template shell = /bin/bash


    Any clues on this?

    I really do appreciate any input. Thanks!

  7. #6
    Linux Guru AlexK's Avatar
    Join Date
    Feb 2005
    Location
    Earth
    Posts
    3,379
    Sorry for delay in replying, I was kinda busy.
    make the following changes in smb.conf:
    1. set the netbios name i.e. change this:
    # netbios name = <name_of_this_server>
    to
    netbios name = enter_your_server_name_here
    2. Set your hosts allow/deny field like so:
    [quote hosts deny all
    hosts allow 192.168.1.0 <-- replace with your ip address range the 0 on end means all hosts in 192.168.1 network[/quote]

    3. if you are setting the security level to share i.e. no passwords, get rid of the encrypt password field i.e. put a # in front of this line:
    encrypt passwords = yes
    try those, if it doesn't work follow the howto I linked to in my previous post, it explains how to setup a samba server, if you get stuck on any part there, post back and I'll try to help.
    Life is complex, it has a real part and an imaginary part.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •