Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-14-2010, 04:57 PM
|
#1
|
Member
Registered: May 2010
Location: Eindhoven
Distribution: ubuntu/debian
Posts: 152
Rep:
|
samba configuration
hello,
I'm strugling with my samba configuration...
What I want is for my family members to have a share from which they can access 3 things:
their data located on /data/username
a common share for the mythtv data files located on /share
a folder on a raid5 array located on /mnt/raid/backup/username
To do this I made symlinks in /data/username to /mnt/raid/backup/username and I'm planning to do this for the /share folder too
I added this share: in /etc/samba/smb.conf:
[steven]
comment = steven
path = /data/steven
public = no
writable = yes
valid users = steven
but the problem now is:
in gnome it works perfectly when I connect to a windows share:
server: 192.168.0.1
share: steven
username: steven
in windows though when I connect to: file://192.168.0.1/ and give in the username and password it doesn't work and it keeps asking me for login credentials, only difference is I can't fill out a share. So I tried file://192.168.0.1/steven and I get the message the location isn't available.
What am I doing wrong? It is giving me headace atm...
Last edited by Steviepower; 05-14-2010 at 05:02 PM.
|
|
|
05-14-2010, 07:08 PM
|
#2
|
Member
Registered: Apr 2005
Location: France
Distribution: Devuan, Suse, Slackware
Posts: 130
Rep:
|
Do they have accounts on your linux box? Have you created the samba accounts, have you done
Code:
$ smbpasswd -a <username>
? Have you restarted the samba daemons after that? It looks like the samba users do not exist.
|
|
|
05-15-2010, 04:08 AM
|
#3
|
Member
Registered: May 2010
Location: Eindhoven
Distribution: ubuntu/debian
Posts: 152
Original Poster
Rep:
|
I restarted them and added the users, I know it works because if I use the "connect to a server" in debian/ubuntu I can access the shares, I just can't do so when I use windows. In order to connect I enter the same info, the only thing that's different in windows is that I can't give in the sharename before I connect, I can to this in linux.
Shouldn't there be a root where the user can connect to?
Last edited by Steviepower; 05-15-2010 at 04:10 AM.
|
|
|
05-15-2010, 07:02 AM
|
#4
|
Member
Registered: Apr 2005
Location: France
Distribution: Devuan, Suse, Slackware
Posts: 130
Rep:
|
OK, and yes, you should be able to connect to the root and see all the shares. Which version of Windows and samba are we talking about? Also, have you made other changes to the smb.conf file? Can you try and enter workgroup\steven iso just steven on the Windows host?
What is the output of:
Code:
smbclient -L localhost
Have you followed any howto's? So I know which settings you changed. Please add your config file ... ;-)
The usual causes to the problem you have are account issues, which in this case is not the case. Oh, and have you configured LDAP authentication on your linux box? I had a similar issue after I set up LDAP auth ...
Last edited by thecarpy; 05-15-2010 at 07:08 AM.
|
|
|
05-15-2010, 09:14 AM
|
#5
|
Member
Registered: May 2010
Location: Eindhoven
Distribution: ubuntu/debian
Posts: 152
Original Poster
Rep:
|
config file:
Code:
#======================= Global Settings =======================
[global]
## Browsing/Identification ###
# Change this to the workgroup/NT-domain name your Samba server will part of
workgroup = XXX
# server string is the equivalent of the NT Description field
server string = %h server
# If we receive WINS server info from DHCP, override the options above.
include = /etc/samba/dhcp.conf
# This will prevent nmbd to search for NetBIOS names through DNS.
dns proxy = no
#### Networking ####
# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
interfaces = eth0
# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself. However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
bind interfaces only = yes
#### Debugging/Accounting ####
# This tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/log.%m
# Cap the size of the individual log files (in KiB).
max log size = 1000
# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
syslog = 0
# Do something sensible when Samba crashes: mail the admin a backtrace
panic action = /usr/share/samba/panic-action %d
####### Authentication #######
# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
# in the samba-doc package for details.
# security = user
# You may wish to use password encryption. See the section on
# 'encrypt passwords' in the smb.conf(5) manpage before enabling.
encrypt passwords = true
# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.
passdb backend = tdbsam
obey pam restrictions = yes
# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
# sending the correct chat script for the passwd program in Debian Sarge).
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
pam password change = yes
# By default, \\server\username shares can be connected to by anyone
# with access to the samba server.
# The following parameter makes sure that only "username" can connect
# to \\server\username
# This might need tweaking when using external authentication schemes
valid users = %S
[steven]
comment = steven
path = /home/steven
public = no
writable = yes
valid users = steven
# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
server:/home/steven$ smbclient -L 192.168.0.1
Enter steven's password:
Domain=[SERVER] OS=[Unix] Server=[Samba 3.2.5]
tree connect failed: NT_STATUS_ACCESS_DENIED
|
|
|
05-15-2010, 09:36 AM
|
#6
|
Member
Registered: Apr 2005
Location: France
Distribution: Devuan, Suse, Slackware
Posts: 130
Rep:
|
Aha, so there is an issue here. Can you try
Code:
sudo smbpasswd -a steven
, then
Code:
sudo smbpasswd steven
. what output do you get? We are getting there ...
Uncomment:
restart samba and retry.
Also, what do you get in /var/log/samba/log.<hostname>, /var/log/samba/log.smbd and /var/log/samba/log.nmbd
Last edited by thecarpy; 05-15-2010 at 11:40 AM.
|
|
|
06-05-2010, 08:47 AM
|
#7
|
Member
Registered: May 2010
Location: Eindhoven
Distribution: ubuntu/debian
Posts: 152
Original Poster
Rep:
|
Ok it has been a while since I've been here for help on this subject but I really think you're thinking in the wrong direction. Everything works fine on the windows xp machines but the windows 7 machines just can't authenticate!
I tried to install the latest version from the backports repo but this didn't work either I still get the same message and the
Code:
sh-3.2$ smbclient -L 192.168.0.1
Enter peter's password:
Domain=[XXX] OS=[Unix] Server=[Samba 3.5.3]
tree connect failed: NT_STATUS_ACCESS_DENIED
I also tried the smbpasswd -a steven and the smbpasswd steven they both ask for the password and they don't give any other output.
I previously uncommented the security = user line in /etc/samba/smb.conf
I get these errors in the log.hostname:
Code:
[2010/06/05 15:19:20.873458, 0] lib/util_sock.c:474(read_fd_with_timeout)
[2010/06/05 15:19:20.873651, 0] lib/util_sock.c:1432(get_peer_addr_internal)
getpeername failed. Error was Transport endpoint is not connected
read_fd_with_timeout: client 0.0.0.0 read error = Connection reset by peer.
[2010/06/05 15:19:43.017408, 1] smbd/service.c:678(make_connection_snum)
create_connection_server_info failed: NT_STATUS_ACCESS_DENIED
[2010/06/05 15:19:48.886617, 1] smbd/service.c:678(make_connection_snum)
create_connection_server_info failed: NT_STATUS_ACCESS_DENIED
[2010/06/05 15:19:48.887927, 1] smbd/service.c:678(make_connection_snum)
create_connection_server_info failed: NT_STATUS_ACCESS_DENIED
[2010/06/05 15:20:02.870888, 0] lib/util_sock.c:474(read_fd_with_timeout)
[2010/06/05 15:20:02.871071, 0] lib/util_sock.c:1432(get_peer_addr_internal)
getpeername failed. Error was Transport endpoint is not connected
read_fd_with_timeout: client 0.0.0.0 read error = Connection reset by peer.
log.smbd
Code:
[2010/06/05 15:16:13, 0] smbd/server.c:1123(main)
smbd version 3.5.3 started.
Copyright Andrew Tridgell and the Samba Team 1992-2010
[2010/06/05 15:16:13.997911, 0] printing/print_cups.c:108(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2010/06/05 15:16:14.001182, 0] printing/print_cups.c:108(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2010/06/05 15:16:14.125488, 1] passdb/pdb_tdb.c:503(tdbsam_open)
tdbsam_open: Converting version 3.0 database to version 4.0.
[2010/06/05 15:16:14.132234, 1] passdb/pdb_tdb.c:282(tdbsam_convert_backup)
tdbsam_convert_backup: updated /var/lib/samba/passdb.tdb file.
[2010/06/05 15:16:44, 0] smbd/server.c:1123(main)
smbd version 3.5.3 started.
Copyright Andrew Tridgell and the Samba Team 1992-2010
[2010/06/05 15:16:44.753259, 0] printing/print_cups.c:108(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2010/06/05 15:16:44.756754, 0] printing/print_cups.c:108(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
log.nmdb
Code:
[2010/06/05 15:16:08, 0] nmbd/nmbd.c:terminate(68)
Got SIGTERM: going down...
[2010/06/05 15:16:13, 0] nmbd/nmbd.c:857(main)
nmbd version 3.5.3 started.
Copyright Andrew Tridgell and the Samba Team 1992-2010
[2010/06/05 15:16:34.462811, 0] nmbd/nmbd.c:71(terminate)
Got SIGTERM: going down...
[2010/06/05 15:16:44, 0] nmbd/nmbd.c:857(main)
nmbd version 3.5.3 started.
Copyright Andrew Tridgell and the Samba Team 1992-2010
[2010/06/05 15:17:07.743976, 0] nmbd/nmbd_become_lmb.c:395(become_local_master_stage2)
*****
Samba name server SERVER is now a local master browser for workgroup XXX on subnet 192.168.0.1
*****
I think the problem is in the windows 7 machines so I tried the following on one of them:
http://wiki.samba.org/index.php/Windows7 >> I donwloaded the .reg file and ran it to add them on the client (reboot afterwards)
but still a no-go for the windows 7 machines!
because of the importance of the backup facility trough smb this feature will determine the complete projects failure or success so I really hope I can find the problem here. Anyone else ever connecter windows 7 to a samba server?
|
|
|
06-07-2010, 04:35 AM
|
#8
|
Member
Registered: Apr 2005
Location: France
Distribution: Devuan, Suse, Slackware
Posts: 130
Rep:
|
|
|
|
06-08-2010, 03:47 AM
|
#9
|
Member
Registered: May 2010
Location: Eindhoven
Distribution: ubuntu/debian
Posts: 152
Original Poster
Rep:
|
yeah I have on a different client but this is the home version or something like that so this option isn't in there. I did use the registery tweak to do this. but this didn't solve it either...
|
|
|
11-09-2010, 04:45 AM
|
#10
|
Member
Registered: May 2010
Location: Eindhoven
Distribution: ubuntu/debian
Posts: 152
Original Poster
Rep:
|
Hello, I'm still working on this but I can't get this working!
I get:
Code:
[2010/11/09 11:37:27.755088, 1] smbd/service.c:678(make_connection_snum)
create_connection_server_info failed: NT_STATUS_ACCESS_DENIED
in the logs and in win7 an error (Access denied)
while I can connect with the same credentials in winXP and ubuntu without a problem.
I want to be able to let the win7 home users connect as well but I can't seem to get this done. I really need to get this working because its the last requirement I have to get working in a quite big project. And its kind of a no cure no pay principle. And it's a project for school I need to get done in a month or so.
|
|
|
11-09-2010, 05:45 AM
|
#11
|
Member
Registered: May 2010
Location: Eindhoven
Distribution: ubuntu/debian
Posts: 152
Original Poster
Rep:
|
I've shortened the config file and tried the tutorial on a win7 VM
http://wiki.samba.org/index.php/Windows7
I've updated samba:
Domain=[XXX] OS=[Unix] Server=[Samba 3.5.3]
but still the same problem.
Code:
#======================= Global Settings =======================
[global]
## Browsing/Identification ###
workgroup = XXX
server string = %h server
wins support = no
dns proxy = no
#### Networking ####
interfaces = eth0
bind interfaces only = yes
#### Debugging/Accounting ####
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
####### Authentication #######
security = user
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
pam password change = yes
############ Misc ############
# 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 = /home/samba/etc/smb.conf.%m
#====================== Self added =========================
# to be able to follow symlinks:
follow symlinks = yes;
wide symlinks = yes;
unix extensions = no;
#======================= Share Definitions =======================
valid users = %S
[steven]
comment = steven
path = /home/steven
public = no
writable = yes
valid users = steven
|
|
|
12-19-2010, 12:32 PM
|
#12
|
LQ Newbie
Registered: Oct 2005
Location: Kent UK
Distribution: Ubuntu 10.10
Posts: 26
Rep:
|
Try a restart *OR* from a different pc
Hi folks.
After getting the same issue , i tried from a different pc and could access the smb share straightaway.It was something to do with cachded credentials from the XP machine i was testing. My theory in these circumstances is that i was attempting to connect before i added the domain user to the share and after adding, XP / samba still cached the connection.
A logoff.logon on the XP machine did the trick and i am not able to connect. Of course you can always try another pc and it should work.
Good luck
the rainbowarrior
|
|
|
12-20-2010, 02:54 AM
|
#13
|
Member
Registered: May 2010
Location: Eindhoven
Distribution: ubuntu/debian
Posts: 152
Original Poster
Rep:
|
so now your windows 7 clients can connect? I have tried multiple instances on different xp machines with the same login, I have tried them with windows 7 and I have tried to reboot everything. I just can't get it to work!
|
|
|
All times are GMT -5. The time now is 08:47 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|