# Samba update



## Reken (May 4, 2021)

Tell me how to upgrade samba411 to version 412 via portupgrde? I am using samba411 as DC, so after updating DC should work as before


----------



## Tieks (May 4, 2021)

The current ports tree only has net/samba412 and net/samba413, not net/samba411. If 
	
	



```
pkg version -v
```
 reports your samba as orphaned, portupgrade probably won't work. If net/samba411 is missing in your ports tree try to build and install samba412 first using 
	
	



```
make install clean
```
. If that works you can delete 411 with 
	
	



```
pkg delete -f net/samba411
```
.


----------



## SirDice (May 4, 2021)

```
-o	ORIGIN
     --origin ORIGIN	    Specify a port to upgrade the following package
			    with.
```
`portupgrade -o net/samba412 net/samba411`


----------



## Reken (May 4, 2021)

What about client computers? Re-enter the domain? I have samba as DC


----------



## SirDice (May 4, 2021)

Test it on a test server, obviously. But the actual database doesn't get deleted, so it should still be there. It's only the application that gets updated, configuration files et al are all left in place when you remove a package.


----------



## Reken (May 5, 2021)

I managed to upgrade samba to version 412. But samba forgot my domain, why is that? How to update samba if it is a DC? This not normal...


----------



## ShelLuser (May 5, 2021)

Did you check the software documentation for any specific upgrade instructions? Just because you're using ports / packages doesn't mean that the official documentation no longer matters. 

I'm not sure what happened here ("it didn't work" isn't very descriptive), but not following steps could be a cause.


----------



## Reken (May 5, 2021)

In the official documentation for the DC samba update, it is written that the domain should work after the update ... In practice, the domain is lost ... Cut from the official doc:     
Stop all Samba services.    
 Install the latest packages over your existing ones.     
Start the samba daemon.     
Run the Samba AD DC database check to identify (and fix) any potential problems with the database.     
Check your Samba log files for errors.     
Test the Samba services work on your updated installation, e.g. verify users can login successfully via the upgraded DC.

The last point of the instruction does not work ...


----------



## Reken (May 8, 2021)

Tell me, why do I need to update Samba411 to version 412? My Samba411 works well with my local network. Why upgrade? Just because a new version came out? What are the advantages for me in the new version of Samba? 
P.S. The fact that samba411 was removed from ports is disappointing ...


----------



## Tieks (May 8, 2021)

See https://cgit.freebsd.org/ports/log/net/samba412 for changes in version 4.12. Note the security issues there. Version 411 will probably no longer be maintained, so new security flaws won't be fixed. That's why it is no longer in ports. You will have to look at the log files to find out what's going wrong. You might even want to try v413, that will save you another upgrade.


----------



## Reken (May 9, 2021)

The new version is good. But the problem is that after the update, samba forgets the domain ...


----------

