Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 30

Thread: Ubuntu Server + Samba File Server

  1. #11
    Join Date
    Feb 2010
    Location
    United States
    Beans
    29
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Ubuntu Server + Samba File Server

    Quote Originally Posted by joberly View Post
    Typically user share access is used, instead of the security = share.

    Try using security = user and supply Samba with a valid username and password. (Only required if you actually have the specific share requiring certain user(s), which you're current configuration is not setup for.)

    Also use the 'testparm' utility to test the Samba configuration, as well as the command 'smbtree' to show your current shares.

    Changing the security = user did help. By valid username and password those would be the samba added username and passwords and not the ubuntu ones correct?

    I currently use
    Code:
    testparm -s smb.conf.master > smb.conf
    to test the samba configuration as was suggested via the Samba Guides and howto's out there.

    Although I have that working now on a Mac OSX computer when I go to Connect to server and attempt to connect to smb://ubuntu it gives me a connection failed error. With this small amount of configuration shouldn't I at least be able to see the share directory on my Mac?

    I also when restarting samba and reloading the smb.conf have this issue
    Code:
    $ /etc/init.d/samba reload
     * Reloading /etc/samba/smb.conf smbd only
    start-stop-daemon: warning: failed to kill 1534: Operation not permitted
    1 pids were not killed
    No process in pidfile `/var/run/samba/smbd.pid' found running; none killed.
       ...done.
    What pid? are they talking about? this seems like an issue that I should be fixed although it may not be hurting anything, but I have no idea.
    Last edited by endlessracingz; February 20th, 2010 at 11:46 PM.

  2. #12
    Join Date
    Apr 2008
    Beans
    98

    Re: Ubuntu Server + Samba File Server

    First off, to restart system services you need to do it as root (use sudo). That is why it cannot kill the samba process, you don't have sufficient permissions.

    As far as the usernames and passwords, they can be valid system users, or users setup in the samba password file. You utilize this based on the valid users flag in your specific share.

    Example,

    valid user = jsmith

    You can allow multiple users,

    valid user = jsmith, jdoe, ataylor

    These directives will go within each specific share declaration in your smb.conf.

    I am not too familiar with Macs and how they implement CIFS/SMB, so I unfortunately cannot help with Mac clients. Do you have a Windows client or another Linux client that you can test with?


    EDIT: I am also not sure why you are using those paramiters with testparm. You can simply issue 'testparm' and it will test the correct /etc/samba/smb.conf that you should be using. Unless you specifically instructed Samba to use a file called smb.conf.master.
    Last edited by joberly; February 21st, 2010 at 12:02 AM.

  3. #13
    Join Date
    Feb 2010
    Location
    United States
    Beans
    29
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Ubuntu Server + Samba File Server

    Quote Originally Posted by joberly View Post
    First off, to restart system services you need to do it as root (use sudo). That is why it cannot kill the samba process, you don't have sufficient permissions.
    Oops a little embarrassing

    As far as the usernames and passwords, they can be valid system users, or users setup in the samba password file. You utilize this based on the valid users flag in your specific share.

    Example,

    valid user = jsmith

    You can allow multiple users,

    valid user = jsmith, jdoe, ataylor

    These directives will go within each specific share declaration in your smb.conf.
    If the directories filer permissions is read and writable to a group, say administrators, would i still have to specify the individual user names as you stated above. Then again I guess that thinking is flawed since the groups are associated with ubuntu and not the samba usernames or can they? Previously you did say the could be system or samba users. If that is so why have I read that you have to create a samba user in order for samba to work, or in order to use the system info for samba is there something in the smb.conf file I need to set in the global area?

    I am not too familiar with Macs and how they implement CIFS/SMB, so I unfortunately cannot help with Mac clients. Do you have a Windows client or another Linux client that you can test with?
    Unfortunately I do not at the moment, but I have followed howto's online and i can't seem to find the /share directory that I'm trying to share through samba.
    Last edited by endlessracingz; February 21st, 2010 at 12:19 AM.

  4. #14
    Join Date
    Apr 2008
    Beans
    98

    Re: Ubuntu Server + Samba File Server

    You can pass groups to Samba in a similar fashion:

    valid user = @group

    Does the Mac have a "network neighborhood" style structure where you can simply browse local networked computers? Also, making sure the Mac is on the same workgroup as defined in your smb.conf.

    Try using smb://hostname/share and also smb://ip_address/share

  5. #15
    Join Date
    May 2009
    Beans
    342
    Distro
    Ubuntu

    Re: Ubuntu Server + Samba File Server

    Quote Originally Posted by endlessracingz View Post
    Although I have that working now on a Mac OSX computer when I go to Connect to server and attempt to connect to smb://ubuntu it gives me a connection failed error. With this small amount of configuration shouldn't I at least be able to see the share directory on my Mac?
    to hit on this, it is a problem with DNS resolution. try to connect smb://ipaddress

    unless you have something in your network acting as a dns server (some routers will do this) your mac has no idea that ubuntu exists on the network, as it has no way of resolving the name to an ip address

  6. #16
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Ubuntu Server + Samba File Server

    Quote Originally Posted by endlessracingz View Post
    ...Then again I guess that thinking is flawed since the groups are associated with ubuntu and not the samba usernames or can they? Previously you did say the could be system or samba users. ...
    I believe you have to have a valid Ubuntu user first. Then you add to the smbpasswd account. The groups are the Ubuntu groups.

    See here.
    Last edited by bab1; February 21st, 2010 at 01:13 AM. Reason: correction
    -BAB1

  7. #17
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Ubuntu Server + Samba File Server

    Quote Originally Posted by pirateghost View Post
    to hit on this, it is a problem with DNS resolution. try to connect smb://ipaddress

    unless you have something in your network acting as a dns server (some routers will do this) your mac has no idea that ubuntu exists on the network, as it has no way of resolving the name to an ip address
    Maybe...

    It would depend upon what the "connection failed error" was.
    -BAB1

  8. #18
    Join Date
    Feb 2010
    Location
    United States
    Beans
    29
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Ubuntu Server + Samba File Server

    Quote Originally Posted by pirateghost
    to hit on this, it is a problem with DNS resolution. try to connect smb://ipaddress

    unless you have something in your network acting as a dns server (some routers will do this) your mac has no idea that ubuntu exists on the network, as it has no way of resolving the name to an ip address
    I have tried smb://ipaddress and i have the same error/issue. My router might possibly be acting as a DNS server but I'm not sure at the moment. Even if it is shouldn't I have no problem connecting using the smb://ipaddress method?

    Quote Originally Posted by bab1 View Post
    I believe you have to have a valid Ubuntu user first. Then you add to the smbpasswd account. The groups are the Ubuntu groups.

    See here.
    I have already added several smbpasswd accounst. I came across the
    Code:
     pdbedit -w -L
    command to list out the samba users so I know I have added them.

    Quote Originally Posted by bab1
    Quote Originally Posted by pirateghost
    to hit on this it is a problem with the DNS resolution. try to connect smb://ipaddress

    unless you have something on your network acting as a dns server (some routers will do this) you mac has no idea that ubuntu exists on the network, as it has no way of resolving a name to an ip address
    Maybe...

    It would depend upon what the "connection failed error" was.
    The error my Mac gives me is:

    Connection failed

    The server “192.168.1.190” may not exist or it is unavailable at this time. Check the server name or IP address, check your network connection, and then try again.
    Last edited by endlessracingz; February 21st, 2010 at 08:44 PM.

  9. #19
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Ubuntu Server + Samba File Server

    Quote Originally Posted by endlessracingz View Post
    I have tried smb://ipaddress and i have the same error/issue. My router might possibly be acting as a DNS server but I'm not sure at the moment. Even if it is shouldn't I have no problem connecting using the smb://ipaddress method?
    You should have solid network infrastructure in place.

    I would suggest that you have a network numbering scheme in mind and a hostname for each of you devices. All of my hosts except the laptops use a static IP address (manually configured). The laptops get their addresses from a DHCP server incorporated into the router.

    You also absolutely must have some sort of nameservice for the LAN. I use DNS for this. As you are using MAC clients that have no idea what NetBIOS is, you must also use DNS.

    For me this means:
    Code:
    192.168.1.0 /24 network 
    192.168.1.1 -- gw1 (Router/DNS/DHCP) 
    192.168.1.10 -- wilshire
    192.168.1.12 -- melrose (Samba Server)
    192.168.1.150 -- vermont (Latptop)
    192.168.1.152 -- western (Laptop)
    192.168.1.200 -- printer (HP 2200)
    192.168.1.245 -- ap1 (Linksys Access Point)
    This gives me IP addresses that are consistent and hostnames that are memorable. In this case we have Los Angeles placenames (gw stands for gateway).

    I have already added at least one smbpasswd account. I have looked for a way to look at what accounts I have already added but still haven't found a way to do that yet. I came across the
    Code:
     pdbedit -w -L
    command to list out the samba users but get the following error:
    tdbsam_open: Failed to open/create TDB passwd [/var/lib/samba/passdb.tdb]
    tdbsam_getsampwnam: failed to open /var/lib/samba/passdb.tdb!
    Segmentation fault
    This indicates a problem with the file /var/lib/samba/passdb.tdb. Does the file exist? What is in the directory /var/lib/samba?

    The [connection] error my Mac gives me is:

    Connection failed

    The server “192.168.1.190” may not exist or it is unavailable at this time. Check the server name or IP address, check your network connection, and then try again.
    Can you ping this address?
    Last edited by bab1; February 21st, 2010 at 09:28 PM.
    -BAB1

  10. #20
    Join Date
    Feb 2010
    Location
    United States
    Beans
    29
    Distro
    Ubuntu 9.10 Karmic Koala

    Re: Ubuntu Server + Samba File Server

    Quote Originally Posted by bab1 View Post
    You should have solid network infrastructure in place.

    I would suggest that you have a network numbering scheme in mind and a hostname for each of you devices. All of my hosts except the laptops use a static IP address (manually configured). The laptops get their addresses from a DHCP server incorporated into the router.

    You also absolutely must have some sort of nameservice for the LAN. I use DNS for this. As you are using MAC clients that have no idea what NetBIOS is, you must also use DNS.

    For me this means:
    Code:
    192.168.1.0 /24 network 
    192.168.1.1 -- gw1 (Router/DNS/DHCP) 
    192.168.1.10 -- wilshire
    192.168.1.12 -- melrose (Samba Server)
    192.168.1.150 -- vermont (Latptop)
    192.168.1.152 -- western (Laptop)
    192.168.1.200 -- printer (HP 2200)
    192.168.1.245 -- ap1 (Linksys Access Point)
    This gives me IP addresses that are consistent and hostnames that are memorable. In this case we have Los Angeles placenames (gw stands for gateway).
    Currently I have a similar arrangement or at least I believe I do.
    The network range is 192.168.1.2/254
    Router as 192.168.1.1
    Then I have several devices with static IP's such as the server which is 192.168.1.190
    as well as a PS3 at 192.168.1.180
    I have a few other items on the network with static IP's but they wont have anything to do with the server.

    All other laptops and computers are dynamic and assigned ip's from the routers dhcp.

    I believe i know what DNS is but no idea how to implement it on my home network. This may be my issue. I'll do some searching into that matter, but please if you can as easily help me out with it, I would very much appreciate it.

    Can you ping this address?
    Yes I can I receive the following output
    Code:
    PING 192.168.1.190 (192.168.1.190): 56 data bytes
    64 bytes from 192.168.1.190: icmp_seq=0 ttl=64 time=2.021 ms
    64 bytes from 192.168.1.190: icmp_seq=1 ttl=64 time=4.416 ms
    64 bytes from 192.168.1.190: icmp_seq=2 ttl=64 time=1.806 ms
    64 bytes from 192.168.1.190: icmp_seq=3 ttl=64 time=0.734 ms
    64 bytes from 192.168.1.190: icmp_seq=4 ttl=64 time=1.554 ms
    64 bytes from 192.168.1.190: icmp_seq=5 ttl=64 time=3.746 ms
    64 bytes from 192.168.1.190: icmp_seq=6 ttl=64 time=2.911 ms
    64 bytes from 192.168.1.190: icmp_seq=7 ttl=64 time=1.088 ms
    64 bytes from 192.168.1.190: icmp_seq=8 ttl=64 time=2.583 ms
    64 bytes from 192.168.1.190: icmp_seq=9 ttl=64 time=2.014 ms
    
    --- 192.168.1.190 ping statistics ---
    10 packets transmitted, 10 packets received, 0.0% packet loss
    round-trip min/avg/max/stddev = 0.734/2.287/4.416/1.091 ms
    but I still cannot connect to the shared directories on the server. Perhaps this is the DNS issue you stated above...

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

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