Can't connect to Samba share after reinstall
I have a home file server on which I recently reinstalled the OS. I replaced the 32bit Ubuntu Server 10.04.2 with 10.04.3 64bit due to hardware upgrade. I've copied the previous Samba configuration, recreated the shared user, and made sure the permissions on the shared directories on the other disks are still intact. I have an XP and a Win7 machine. Both can see the file server, but neither can access the share. If I go to \\Server
the Windows machine , it prompts for username/password and seems to accept the connection. If I go to \\Server\Share
the next one it will ask for user/pass again and will not authenticate.
The network settings on the Windows computer have not changed. Is there possibly some other configuration missing from the server? What else could be wrong?
Troubleshooting: I found the logs as suggested. Both smbd and nmbd are running. In the logs of the windows machine there are a lot of lines like this when trying to connect.
[2011/11/07 07:23:53, 1] smbd/service.c:676(make_connection_snum)
create_connection_server_info failed: NT_STATUS_ACCESS_DENIED
This is obviously the problem, but I don't know why this is happening. The user and pass I'm using are fine and working fine before the upgrade. I did find this in log.winbindd-idmap:
[2011/11/07 07:14:12, 1] winbindd/idmap.c:321(idmap_init_domain)
idmap initialization returned NT_STATUS_UNSUCCESSFUL
[2011/11/07 07:23:40, 0] winbindd/idmap.c:201(smb_register_idmap_alloc)
idmap_alloc module tdb already registered!
[2011/11/07 07:23:40, 0] winbindd/idmap.c:149(smb_register_idmap)
Idmap module passdb already registered!
[2011/11/07 07:23:40, 0] winbindd/idmap.c:149(smb_register_idmap)
Idmap module nss already registered!
[2011/11/07 07:23:40, 1] winbindd/idmap_tdb.c:214(idmap_tdb_load_ranges)
idmap uid missing
[2011/11/07 07:23:40, 0] winbindd/idmap_tdb.c:287(idmap_tdb_open_db)
Upgrade of IDMAP_VERSION from -1 to 2 is not possible with incomplete configur
ation
[2011/11/07 07:23:40, 1] winbindd/idmap.c:321(idmap_init_domain)
idmap initialization returned NT_STATUS_UNSUCCESSFUL
log.smbd
[2011/11/06 20:01:29, 0] smbd/server.c:1069(main)
smbd version 3.4.7 started.
Copyright Andrew Tridgell and the Samba Team 1992-2009
[2011/11/06 20:01:29, 0] printing/print_cups.c:103(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2011/11/06 20:01:29, 0] printing/print_cups.c:103(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2011/11/06 20:01:29, 0] smbd/server.c:1115(main)
standard input is not a socket, assuming -D option
log.nmbd
[2011/11/06 13:40:55, 0] nmbd/nmbd.c:854(main)
nmbd version 3.4.7 started.
Copyright Andrew Tridgell and the Samba Team 1992-2009
smb.conf, most of which is stock
[global]
workgroup = MyGroup # edited
server string = %h server (Samba, Ubuntu)
dns proxy = no
use sendfile = yes # edited
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
security = user # edited
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
guest account = myshareuser # edited
usershare allow guests = yes
[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = no
read only = yes
create mask = 0700
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
# added
[share]
path = /mnt/storage/share
force user = myshareuser
force group = myshareuser
read only = No
create mask = 0777
directory mask = 0777
guest only = No
guest ok = No
[backup]
path = /mnt/storage/backup
force user = myshareuser
force group = myshareuser
read only = No
create mask = 0777
directory mask = 0777
guest only = No
guest ok = No
Probably a corrupt passdb.tdb file. Can I add users if I remove it and restart Samba?