Hello, I am trying to learn how to use Samba. I first just want to get it to work, then I'll make it better. I am not concerned about security since everything is on a private network. I am following the material in "CentOS 6 Linux Server Cookbook" by Jonathan Hobson. I am using two virtual computers with Virtual Box running on Fedora 19. Both virtual computers have bridged networking. One virtual computer is Win7, the other is CentOS 6.4. They are both up to date. There is only one user, "admin", on the CentOS virtual computer. The Win7 computer can successfully ping the CentOS computer. My Win7 computer can not see the share on the Samba server. The command "# testparm" shows no errors. The command below gives the following error: [admin at CentOS ~]$ smbclient //CentOS/admin Enter admin's password: Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.9-151.el6_4.1] tree connect failed: NT_STATUS_ACCESS_DENIED My smb.conf file, below, is taken from the book I am using. Any suggestions or help would be much appreciated. Thank you, Joe Hesse [global] unix charset = UTF-8 dos charset = CP932 workgroup = WORKGROUP server string = CentOS netbios name = CentOS dns proxy = no wins support = no interfaces = 127.0.0.0/8 192.168.0.0/24 eth0 bind interfaces only = no log file = /var/log/samba/log.%m max log size = 1000 syslog only = no syslog = 0 panic action = /usr/share/samba/panic-action %d security = user encrypt passwords = true passdb backend = tdbsam obey pam restrictions = yes unix password sync = yes passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\ spassword:* %n\n *password\supdated\ssuccessfully* . pam password change = yes map to guest = bad user usershare allow guests = no domain master = no local master = no preferred master = no os level = 8 [homes] comment = Home Directories browseable = yes writable = yes valid users = %S create mask =0755 directory mask =0755
On Fri, 2013-10-04 at 14:11 -0500, Joseph Hesse wrote:> Hello, > > I am trying to learn how to use Samba. I first just want to get it to > work, then I'll make it better. > I am not concerned about security since everything is on a private network. > I am following the material in "CentOS 6 Linux Server Cookbook" by > Jonathan Hobson. > I am using two virtual computers with Virtual Box running on Fedora 19. > Both virtual computers have bridged networking. > One virtual computer is Win7, the other is CentOS 6.4. > They are both up to date. There is only one user, "admin", on the CentOS > virtual computer. > > The Win7 computer can successfully ping the CentOS computer. > > My Win7 computer can not see the share on the Samba server. > > The command "# testparm" shows no errors. > > The command below gives the following error: > > [admin at CentOS ~]$ smbclient //CentOS/admin > Enter admin's password: > Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.9-151.el6_4.1] > tree connect failed: NT_STATUS_ACCESS_DENIED > > My smb.conf file, below, is taken from the book I am using. > > Any suggestions or help would be much appreciated. > > Thank you, > Joe Hesse > > [global] > unix charset = UTF-8 > dos charset = CP932 > workgroup = WORKGROUP > server string = CentOS > netbios name = CentOS > dns proxy = no > wins support = no > interfaces = 127.0.0.0/8 192.168.0.0/24 eth0 > bind interfaces only = no > log file = /var/log/samba/log.%m > max log size = 1000 > syslog only = no > syslog = 0 > panic action = /usr/share/samba/panic-action %d > security = user > encrypt passwords = true > passdb backend = tdbsam > obey pam restrictions = yes > unix password sync = yes > passwd program = /usr/bin/passwd %u > passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\ > spassword:* %n\n *password\supdated\ssuccessfully* . > pam password change = yes > map to guest = bad user > usershare allow guests = no > domain master = no > local master = no > preferred master = no > os level = 8 > [homes] > comment = Home Directories > browseable = yes > writable = yes > valid users = %S > create mask =0755 > directory mask =0755 > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centosHello Joseph, Is the samba service runing? $ service smb start $ service nmb start You will also need to configure the firewall for the following ports, 137, 138, 139 and 445. -- Kind Regards Earl Ramirez GPG Key: http://trinipino.com/PublicKey.asc -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 316 bytes Desc: This is a digitally signed message part URL: <http://lists.centos.org/pipermail/centos/attachments/20131004/73e5882f/attachment-0004.sig>
On 10/04/2013 02:15 PM, Earl Ramirez wrote:> On Fri, 2013-10-04 at 14:11 -0500, Joseph Hesse wrote: >> Hello, >> >> I am trying to learn how to use Samba. I first just want to get it to >> work, then I'll make it better. >> I am not concerned about security since everything is on a private network. >> I am following the material in "CentOS 6 Linux Server Cookbook" by >> Jonathan Hobson. >> I am using two virtual computers with Virtual Box running on Fedora 19. >> Both virtual computers have bridged networking. >> One virtual computer is Win7, the other is CentOS 6.4. >> They are both up to date. There is only one user, "admin", on the CentOS >> virtual computer. >> >> The Win7 computer can successfully ping the CentOS computer. >> >> My Win7 computer can not see the share on the Samba server. >> >> The command "# testparm" shows no errors. >> >> The command below gives the following error: >> >> [admin at CentOS ~]$ smbclient //CentOS/admin >> Enter admin's password: >> Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.9-151.el6_4.1] >> tree connect failed: NT_STATUS_ACCESS_DENIED >> >> My smb.conf file, below, is taken from the book I am using. >> >> Any suggestions or help would be much appreciated. >> >> Thank you, >> Joe Hesse >> >> [global] >> unix charset = UTF-8 >> dos charset = CP932 >> workgroup = WORKGROUP >> server string = CentOS >> netbios name = CentOS >> dns proxy = no >> wins support = no >> interfaces = 127.0.0.0/8 192.168.0.0/24 eth0 >> bind interfaces only = no >> log file = /var/log/samba/log.%m >> max log size = 1000 >> syslog only = no >> syslog = 0 >> panic action = /usr/share/samba/panic-action %d >> security = user >> encrypt passwords = true >> passdb backend = tdbsam >> obey pam restrictions = yes >> unix password sync = yes >> passwd program = /usr/bin/passwd %u >> passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\ >> spassword:* %n\n *password\supdated\ssuccessfully* . >> pam password change = yes >> map to guest = bad user >> usershare allow guests = no >> domain master = no >> local master = no >> preferred master = no >> os level = 8 >> [homes] >> comment = Home Directories >> browseable = yes >> writable = yes >> valid users = %S >> create mask =0755 >> directory mask =0755 >> _______________________________________________ >> CentOS mailing list >> CentOS at centos.org >> http://lists.centos.org/mailman/listinfo/centos > Hello Joseph, > > Is the samba service runing? > > $ service smb start > $ service nmb start > > You will also need to configure the firewall for the following ports, > 137, 138, 139 and 445. > > > > > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centosBoth services are running. I checked with "service smb status" and "service nmb status" Also checked with chkconfig --list The ports are open. I checked with "system-config-firewall" and the ports for Samba and Samba Client are open.
On 10/4/2013 12:11 PM, Joseph Hesse wrote:> security = useryou'll need to run smbpasswd -a admin on the samba server, and give the 'admin' SMB user a password. Samba can't use the unix /etc/password|shadow combination as the hashes used by SMB aren't compatible. -- john r pierce 37N 122W somewhere on the middle of the left coast
You can connect to a samba share without user or password authentication. That's how I have my server setup at my house. I dont know the settings off hand but illpost them shortly -----Original Message----- From: Earl Ramirez Sent: 10/04/13 8:35 PM To: CentOS mailing list Subject: Re: [CentOS] Samba problem On Fri, 2013-10-04 at 18:27 -0500, Joseph Hesse wrote:> On 10/04/2013 02:39 PM, John R Pierce wrote: > > On 10/4/2013 12:11 PM, Joseph Hesse wrote: > >> security = user > > > > you'll need to run > > > > smbpasswd -a admin > > > > on the samba server, and give the 'admin' SMB user a password. Samba > > can't use the unix /etc/password|shadow combination as the hashes used > > by SMB aren't compatible. > > > > > I used "smbpasswd "to assign a Samba password to user "admin". My Win7 > virtual machine still couldn't see the share. It is my impression that > the smb.conf file in the book I am using allows passwordless access to > the shares.<snip> Are you able to authenticate to the samba server from the Windows 7 machine?> Also, if it helps, here is some more output. > > [root at CentOS ~]# smbclient -L localhost -U > Enter root's password: > Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.9-151.el6_4.1] > > Sharename Type Comment > --------- ---- ------- > homes Disk Home Directories > IPC$ IPC IPC Service (CentOS) > Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.6.9-151.el6_4.1] > > Server Comment > --------- ------- > CENTOS CentOS > WIN7VM > > Workgroup Master > --------- ------- > WORKGROUP WIN7VMWhat is the out put from smbclient -L localhost -U admin? I saw that you have the home directory enabled, by default SELinux does not permit access to the home directory, unless you enable the boolean $ sudo setsebool -P samba_enable_home_dirs on When you try to access the samba share from the windows 7 machine, what is happening? Are you being prompt for the credentials? If you do not have a backup of the smb.conf file, I have placed a copy from a clean install [0] [0] http://trinipino.com/share/smb.conf> > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos-- Kind Regards Earl Ramirez GPG Key: http://trinipino.com/PublicKey.asc
On 05/10/13 05:11, Joseph Hesse wrote:> Hello, > > I am trying to learn how to use Samba. I first just want to get it to > work, then I'll make it better. > I am not concerned about security since everything is on a private network. > I am following the material in "CentOS 6 Linux Server Cookbook" by > Jonathan Hobson. > I am using two virtual computers with Virtual Box running on Fedora 19. > Both virtual computers have bridged networking. > One virtual computer is Win7, the other is CentOS 6.4. > They are both up to date. There is only one user, "admin", on the CentOS > virtual computer. > > The Win7 computer can successfully ping the CentOS computer. > > My Win7 computer can not see the share on the Samba server. > >On some Windows 7 systems (not all in my experience), you'll need to adjust the LAN Manager authentication level. To do this, 1. Launch *gpedit.msc* 2. Then under *Computer Management* drill down to *Windows Settings*->*Security Settings*->*Local Policies*->*Security Options* 3. On the right hand side, scroll down to *Network security: LAN Manager authentication level* and double-click it 4. In the drop down, select *Send LM & NTLM - use NTLMv2 session security if negotiated* I'm not sure sure what exactly causes some *just-built* Windows 7 PC's to require this setting. For instance, on the network I manage, I'd say that 30% of just-built Windows 7 PC's require this settings while others function just fine when it is left as *Not Defined*! Hope that helps you! ak.