Manual install SAMBA4 AD-DC not starting on reboot

Asked by Christopher Angulo-Bertram

I built Samba4.4.3 AD-DC on Ubuntu 16.04, and cannot figure out how to script it so I can start the samba service on reboot.

I followed the instructions from here:

http://ubuntuforums.org/showthread.php?t=2146198

I did not use the install from the Ubuntu software, or the repositories because I am building an Active Directory Domain controller, this requires more than just Samba, and more than the standard install in the repositories builds.

and I also tried this answer for the problem from here:

http://ubuntuforums.org/showthread.php?t=2132259

I have also created systemd service files to try and start this, but nothing has worked.

I want to have Samba restart after reboot.
I am running 16.04, and this seems to be the only place this problem is occurring.
I believe the problem is wit systemD.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
Christopher Angulo-Bertram (chris-n-angulo-bertram) said :
#1

I posted this same issue on AskUbuntu, even gave a bounty, no answer, so now I am coming here.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

Are there no YouTube guides?

Revision history for this message
Christopher Angulo-Bertram (chris-n-angulo-bertram) said :
#3

Yes there are, but you will notice that the guides I used were official
Ubuntu guides. I also looked through the guides on YouTube, and the one
that specifically dealt with 16.04 out right tells you that you are on
your own for figuring out how to make it start on reboot.

On 06/10/2016 12:13 AM, actionparsnip wrote:
> Your question #295108 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/295108
>
> Status: Open => Needs information
>
> actionparsnip requested more information:
> Are there no YouTube guides?
>

Revision history for this message
Christopher Angulo-Bertram (chris-n-angulo-bertram) said :
#4

To anyone that reads this further, I am not lazy and just posting because I am looking for the easy way. I help out on AskUbuntu, and answer lots of questions every day like that. I have searched, tried, searched again, tried again. This really is a problem, I beileve the issue is a systemD issue, and I just need some help in solving it.

Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#5

If you add the command to restart Samba in /etc/rc.local above the 'exit 0' line, it will be ran as root and just before the login prompt appears.

Revision history for this message
Christopher Angulo-Bertram (chris-n-angulo-bertram) said :
#6

OK, let me try it, andI will let you know.

Revision history for this message
Christopher Angulo-Bertram (chris-n-angulo-bertram) said :
#7

@actionparsnip What command line would you want me to put n that file?

exec /usr/local/samba/sbin/samba -D

or some other, I have tried so many different ones, I have confused myself with too many commands.

Revision history for this message
Christopher Angulo-Bertram (chris-n-angulo-bertram) said :
#8

@actionparsnip I am doing some final tests, your answer was the most correct, and the command line I put in my comment was the one I needed.

I will be marking your answer as solving the issue in a little while once I have completed testing, I will also be crediting you on AskUbuntu, although I do not think you are on that site.

Revision history for this message
Christopher Angulo-Bertram (chris-n-angulo-bertram) said :
#9

Thanks actionparsnip, that solved my question.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#10

Cool, just link this page to your askubuntu.com page and job done. I do have an askubuntu.com account but it's rarely used.

Revision history for this message
Christopher Angulo-Bertram (chris-n-angulo-bertram) said :
#11

@actionparsnip, already did, and thanks again. I don't know why it was so hard to find this answer.