[Samba] One account can access samba, another can't.

tms3 at tms3.com tms3 at tms3.com
Thu Jul 8 19:01:38 MDT 2010




>
> My wife and I each have our own workstation dual-booting WinXP and
> Gentoo Linux.  We also have a third which runs Gentoo all the time.  I
> wanted to set up samba on the third box and provide some extra storage
> space for both our Windows installs.  It worked for a few days, then 
> all
> of a sudden it stopped letting my account (michael) in while still
> letting my wife's account (amy) use the share.  Here's
> my /etc/samba/smb.conf:
>
> carter samba # cat /etc/samba/smb.conf
> [global]
> workgroup = MYGROUP
> security = user
> encrypt passwords = yes
> guest account = guest
> wins support = yes
> local master = yes
> os level = 99
> domain master = yes
> preferred master = yes
> hosts allow = 192.168.1. 127.
> interfaces = eth0
> log level = 1
> [tmp]
> path=/tmp
> writeable=yes
>
> [homes]
> path=/samba/michael
> valid users=michael
> writable=yes
>
> path=/samba/amy
> valid users=amy
> writeable=yes

Erm, the [homes] isn't an outline heading.  It is a share name.  It is 
unique, and has a unique path.  You probably want to use an auto login 
for homes such that a user connects to

\\sever\share\%U

where the share in smb.conf would be say

[homes]
      path = /samba
      valid users = michael, amy
      writeable = yes

Then setting up the sub directories michael and amy under /samba and, 
since this is a nice simple setup

chmod -R 700 /samba/michael (and amy)
chown -R michael ./samba/michael

You get the point.  Check

man smb.conf

for options on setting up home directory shares.

Cheers,

TMS III
>
>
>
>
> Here's smbusers:carter samba # cat /etc/samba/smbusers
> # $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/3.4/smbusers,v 
> 1.1
> 2010/02/26 20:11:18 patrick Exp $
>
> # Syntax:
> #   Unix_name = SMB_name1 SMB_name2 ...
>
> root = Administrator admin
> nobody = guest pcguest smbguest
> michael = michael
> amy = amy
>
> (I hope I got the syntax right.)
> carter / # ls -l
> .
> .
> .
> drwxr-xr-x   4 nobody  nobody        30 Jul  8 10:13 samba
> .
> .
> .
> carter / # ls -l /samba
> total 0
> drwx------ 4 amy     users 39 Jul  8 10:13 amy
> drwxr-xr-x 5 michael users 58 Jun 24 00:11 michael
>
> Here I log in with amy:
> carter samba # su - amy
> amy at carter ~ $ smbclient //carter/homes
> Enter amy's password:
> Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.4.6]
> smb: \> ls
>    .                                   D        0  Thu Jul  8 10:13:42
> 2010
>    ..                                  D        0  Thu Jul  8 10:13:49
> 2010
>    backup                              D        0  Fri Jun 25 20:34:15
> 2010
>    Program Files                       D        0  Thu Jul  8 10:13:42
> 2010
>
> 59608 blocks of size 16777216. 58564 blocks available
> smb: \>
>
> and then with mcarter samba # su - michael
> michael at carter ~ $ smbclient //carter/homes
> Enter michael's password:
> Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.4.6]
> tree connect failed: NT_STATUS_ACCESS_DENIED
> michael at carter ~ $
>
>
>
> Here's the contents of my log files:
>
> carter samba # cat log.nmbd
> [2010/07/08 14:32:45,  0] nmbd/nmbd.c:854(main)
>    nmbd version 3.4.6 started.
>    Copyright Andrew Tridgell and the Samba Team 1992-2009
> [2010/07/08 14:32:45,  0] nmbd/asyncdns.c:155(start_async_dns)
>    started asyncdns process 21024
> [2010/07/08 14:32:45,  0]
> nmbd/nmbd_become_dmb.c:337(become_domain_master_browser_wins)
>    become_domain_master_browser_wins:
>    Attempting to become domain master browser on workgroup MYGROUP,
> subnet UNICAST_SUBNET.
> [2010/07/08 14:32:45,  0]
> nmbd/nmbd_become_dmb.c:351(become_domain_master_browser_wins)
>    become_domain_master_browser_wins: querying WINS server from IP
> 192.168.1.2 for domain master browser name MYGROUP<1b> on workgroup
> MYGROUP
> [2010/07/08 14:32:51,  0]
> nmbd/nmbd_become_dmb.c:110(become_domain_master_stage2)
>    *****
>
>    Samba server CARTER is now a domain master browser for workgroup
> MYGROUP on subnet UNICAST_SUBNET
>
>    *****
> [2010/07/08 14:32:51,  0]
> nmbd/nmbd_become_dmb.c:292(become_domain_master_browser_bcast)
>    become_domain_master_browser_bcast:
>    Attempting to become domain master browser on workgroup MYGROUP on
> subnet 192.168.1.2
> [2010/07/08 14:32:51,  0]
> nmbd/nmbd_become_dmb.c:305(become_domain_master_browser_bcast)
>    become_domain_master_browser_bcast: querying subnet 192.168.1.2 for
> domain master browser on workgroup MYGROUP
> [2010/07/08 14:32:59,  0]
> nmbd/nmbd_become_dmb.c:110(become_domain_master_stage2)
>    *****
>
>    Samba server CARTER is now a domain master browser for workgroup
> MYGROUP on subnet 192.168.1.2
>
>    *****
> [2010/07/08 14:33:07,  0]
> nmbd/nmbd_become_lmb.c:395(become_local_master_stage2)
>    *****
>
>    Samba name server CARTER is now a local master browser for 
> workgroup
> MYGROUP on subnet 192.168.1.2
>
>    *****
>
> carter samba # cat log.smbd
> [2010/07/08 14:24:52,  0] smbd/server.c:1073(main)
>    smbd version 3.4.6 started.
>    Copyright Andrew Tridgell and the Samba Team 1992-2009
> [2010/07/08 14:24:52,  0] printing/print_cups.c:103(cups_connect)
>    Unable to connect to CUPS server /var/run/cups/cups.sock:631 - No 
> such
> file or directory
> [2010/07/08 14:24:52,  0] printing/print_cups.c:103(cups_connect)
>    Unable to connect to CUPS server /var/run/cups/cups.sock:631 - No 
> such
> file or directory
> [2010/07/08 14:24:52,  0] smbd/server.c:457(smbd_open_one_socket)
>    smbd_open_once_socket: open_socket_in: Address already in use
> [2010/07/08 14:24:52,  0] smbd/server.c:457(smbd_open_one_socket)
>    smbd_open_once_socket: open_socket_in: Address already in use
> [2010/07/08 14:32:44,  0] smbd/server.c:1073(main)
>    smbd version 3.4.6 started.
>    Copyright Andrew Tridgell and the Samba Team 1992-2009
> [2010/07/08 14:32:45,  0] printing/print_cups.c:103(cups_connect)
>    Unable to connect to CUPS server /var/run/cups/cups.sock:631 - No 
> such
> file or directory
> [2010/07/08 14:32:45,  0] printing/print_cups.c:103(cups_connect)
>    Unable to connect to CUPS server /var/run/cups/cups.sock:631 - No 
> such
> file or directory
> [2010/07/08 14:32:45,  0] smbd/server.c:457(smbd_open_one_socket)
>    smbd_open_once_socket: open_socket_in: Address already in use
> [2010/07/08 14:32:45,  0] smbd/server.c:457(smbd_open_one_socket)
>    smbd_open_once_socket: open_socket_in: Address already in use
> [2010/07/08 14:33:32,  0] lib/util_sock.c:1564(matchname)
>    matchname: host name/address mismatch: ::ffff:192.168.1.2 !=
> carter.espersunited.com
> [2010/07/08 14:33:32,  0] lib/util_sock.c:1685(get_peer_name)
>    Matchname failed on carter.espersunited.com ::ffff:192.168.1.2
> [2010/07/08 14:33:32,  1] smbd/service.c:1063(make_connection_snum)
>    carter (::ffff:192.168.1.2) connect to service amy initially as 
> user
> amy (uid=1001, gid=100) (pid 21335)
> [2010/07/08 14:34:13,  1] smbd/service.c:1240(close_cnum)
>    carter (::ffff:192.168.1.2) closed connection to service amy
> [2010/07/08 14:34:26,  0] lib/util_sock.c:1564(matchname)
>    matchname: host name/address mismatch: ::ffff:192.168.1.2 !=
> carter.espersunited.com
> [2010/07/08 14:34:26,  0] lib/util_sock.c:1685(get_peer_name)
>    Matchname failed on carter.espersunited.com ::ffff:192.168.1.2
> [2010/07/08 14:34:26,  1] smbd/service.c:676(make_connection_snum)
>    create_connection_server_info failed: NT_STATUS_ACCESS_DENIED
>
>
> Please help me out.  This makes no sense to me why it works for amy, 
> but
> not for michael.
> -Michael Sullivan-
>
>
>
>
> --
> To unsubscribe from this list go to the following URL and read the
> instructions: https://lists.samba.org/mailman/options/samba



More information about the samba mailing list