Linux - SoftwareThis 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
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.
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.
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336
Rep:
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.
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.
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336
Original Poster
Rep:
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.
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336
Original Poster
Rep:
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?
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.
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336
Original Poster
Rep:
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!
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 =.
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336
Original Poster
Rep:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.