LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-22-2008, 09:10 PM   #1
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Rep: Reputation: 54
help in samba DC migration


I migrated my DC to a new server. I copied over the .tdb files, the samba configs, the passwd files etc...

for some reason, I still can't authenticate anymore. I even copied over the sid.

Anything else I should copy over? At this point the hostname and IP are the same. The old server is still running on another IP and samba is turned off to avoid conflicts.


Also if I do smbpasswd user for a user that should exist, it says it does not exist. So I must of missed some file.

Another issue I'm having is the netbios name is not being broadcasted for some reason. After adding one of the users I can actually connect via IP but not by domain or hostname. (the FQDN actually resolves but still wont connect)



Also this is in the log file:

Code:
[2008/09/22 23:07:00,  2] lib/interface.c:interpret_interface(469)
  interpret_interface: Adding interface 10.1.1.10/255.255.255.0
[2008/09/22 23:07:00,  2] lib/interface.c:add_interface(334)
  added interface 10.1.1.10/255.2 ip=10.1.1.10 bcast=10.1.1.255 netmask=255.255.255.0
[2008/09/22 23:07:00,  2] lib/util_sock.c:open_socket_in(1267)
  bind failed on port 445 socket_addr = 0.0.0.0.
  Error = Address already in use
[2008/09/22 23:07:00,  2] lib/util_sock.c:open_socket_in(1267)
  bind failed on port 139 socket_addr = 0.0.0.0.
  Error = Address already in use
[2008/09/22 23:07:00,  2] smbd/server.c:open_sockets_smbd(581)
  waiting for a connection
I checked and the ports are NOT in use. (netstat -ln) There is no dead service in the background or anything. I also tried rebooting.

Also selinux is off. I know selinux renders samba useless, so I ensured it was off.

Last edited by Red Squirrel; 09-22-2008 at 10:09 PM.
 
Old 09-23-2008, 12:48 AM   #2
Woodypecker
Member
 
Registered: Mar 2006
Location: Austria
Distribution: Mandriva/Debian
Posts: 104

Rep: Reputation: 17
The log snippet does not reveal enough information. But most of the times such errors are
the result of other misconfigurations, like DNS/hosts settings (cached?), or copied stale/obsolete configuration data like the old wins.dat or connections.tdb.
 
Old 09-23-2008, 04:14 PM   #3
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Original Poster
Rep: Reputation: 54
Crap I thought i replied but my post never went through....

Ok so anyway I copied /etc/samba, /etc/passwd and /etc/shadow over to new box. Anything else I should be coping? that is my problem, not everything got copied.

If I try to do smbpasswd on an user that exist it tells me it does not exist. So there is more to just transfering the .tdb files. It's not finding the user accounts.

Also for whatever reason I keep getting errors that the port is in use, but this is not true. There is no other program using port 139 or any of the smb ports. I can't even ping the net bios name. I can access the shares by IP but not by hostname or netbios name. (the hostname DOES resolve though, but not the netbios name). Something is really screwy.

If it helps, old version was 3.0.24-7.fc5 and new is 3.2.3-0.20.fc9.

I find a doc online on migrating between 3.0.x to 3.2.x but it was blank document. What a tease.

Also I was unable to find any wins.dat file. There was a connections.tdb in /var but I deleted it.


If I do smbtree I also get this error:

tdb(unnamed): tdb_open_ex: could not open file /var/lib/samba/unexpected.tdb: No such file or directory

I can't find that file anywhere on the other server. In fact /var/lib/samba does not even exist on the other server. I still dont get why its not broadcasting the netbios name though. its screwed up. I ran a packet sniffer, it never even responded to any of the smb queries. It IS running. I can telnet to port 139.

Doing research online. Seems like a common issue since FC7. Samba does not broadcast, and yet, smb protocol works through broadcast... soooo... how do I get it to actually broadcast? I have not found any resolution on this at any of the forums I saw this issue posted at.

Last edited by Red Squirrel; 09-23-2008 at 06:54 PM.
 
Old 09-23-2008, 08:12 PM   #4
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Original Poster
Rep: Reputation: 54
Think I got it working...

I need to type nmbd in the command prompt, guess that starts another service related to samba. Guess I'll just add that to my startup script. On my other server I noticed when I stop samba it says:


Shutting down SMB services: [ OK ]
Shutting down NMB services: [ OK ]


On my current it does not show the NMB line... that's weird. So I'll have to do it manually. Is there a way to fix that though?
 
Old 09-24-2008, 12:11 AM   #5
Woodypecker
Member
 
Registered: Mar 2006
Location: Austria
Distribution: Mandriva/Debian
Posts: 104

Rep: Reputation: 17
Well, the scripts in /etc/init.d should take care of starting/stopping both daemons (nmbd is the netbios nameservice daemon, necessary for advertising and broadcasting) - maybe you have only smbd chkconfig'd active?
Anyways, your missing or incomplete user db is another issue.
"Unexpected.tdb" appears only when (view the logs in /var/log/samba, log.smbd or log.nmbd) some "unexpected condition" is going to be logged. All the tdbs should exist in /var/cache/samba.
 
Old 09-24-2008, 08:00 PM   #6
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Original Poster
Rep: Reputation: 54
ok another problem.... I had to remove and rejoin my machines to the domain, now for whatever reason it's trying to use roaming profiles! I get a bunch of errors at windows startup now about not being able to create a path blah blah blah... I just want local profiles!

How do I go about fixing this?
 
Old 09-25-2008, 12:58 AM   #7
Woodypecker
Member
 
Registered: Mar 2006
Location: Austria
Distribution: Mandriva/Debian
Posts: 104

Rep: Reputation: 17
That was another thread already here ....
You have to insert a "logon path = " stanza into the global
section.
Contrary to the manpage, you should NOT use the empty string in parenthesis,
just a bare newline after the =.
 
Old 09-25-2008, 10:33 AM   #8
Red Squirrel
Senior Member
 
Registered: Dec 2003
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336

Original Poster
Rep: Reputation: 54
Thanks that worked. It was actually in my original config but I removed it thinking it was causing a syntax error while trying to get the other stuff to work.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Transparent Samba migration 2.2->3.0.23 mamgdzies Linux - Server 1 02-11-2008 02:13 AM
SAMBA in NT to AD migration epmd Linux - Server 0 08-13-2007 02:30 PM
Samba Migration - best approach? HighLife Linux - Networking 2 02-02-2006 09:55 PM
samba pdc migration bladrag Linux - Networking 0 05-11-2004 07:50 AM
samba migration trust accounts kcourser Linux - Software 1 01-13-2004 01:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration