Should I run a boot script on nsswitch.conf? (Debian 9)
I have a Debian 9 box that's joined to a Windows AD domain.
The main domain controller runs in a VM on this Debian box alongside another physical backup DC.
As it stands the backup DC is out of action at the moment which means that my Debian box is failing to boot due to the configuration of the nsswitch.conf file.
Currently my nsswitch.conf file looks like:
passwd: files winbind
group: files winbind
shadow: files winbind
gshadow: files
If I change it using a recovery shell to use compat then I can login using the local account on the Debian box and then can change it back to use files and winbind after the machine and VM have booted.
I'm debating the best way to fix this going forward, as it will be a while before I rebuild the backup DC.
I've added compat to the end of each of the lines in the nsswitch.conf file which sort of works but yields very long startup times.
I was wondering if it would be possible to run a script during boot that temporarily changed the file and then changed it back after boot?
I was think something like:
cp -f /etc/nsswitch.conf.temp /etc/nsswitch.conf for the startup and then
cp -f /etc/nsswitch.conf.proper /etc/nsswitch.conf for the end of the boot?
I've never looked into startup scripts before and I can't seem to find much useful information on Google about how to find the "end of the boot process"
Alternatively would it be possible to start KVM earlier in the bootup process so that the VM is ready to accept the AD commands?
The only impossible option is to separate the VM from the host as this box is an absolute powerhouse and I can't afford to build another hypervisor.
What do you think of it?
boot active-directory nsswitch winbind
add a comment |
I have a Debian 9 box that's joined to a Windows AD domain.
The main domain controller runs in a VM on this Debian box alongside another physical backup DC.
As it stands the backup DC is out of action at the moment which means that my Debian box is failing to boot due to the configuration of the nsswitch.conf file.
Currently my nsswitch.conf file looks like:
passwd: files winbind
group: files winbind
shadow: files winbind
gshadow: files
If I change it using a recovery shell to use compat then I can login using the local account on the Debian box and then can change it back to use files and winbind after the machine and VM have booted.
I'm debating the best way to fix this going forward, as it will be a while before I rebuild the backup DC.
I've added compat to the end of each of the lines in the nsswitch.conf file which sort of works but yields very long startup times.
I was wondering if it would be possible to run a script during boot that temporarily changed the file and then changed it back after boot?
I was think something like:
cp -f /etc/nsswitch.conf.temp /etc/nsswitch.conf for the startup and then
cp -f /etc/nsswitch.conf.proper /etc/nsswitch.conf for the end of the boot?
I've never looked into startup scripts before and I can't seem to find much useful information on Google about how to find the "end of the boot process"
Alternatively would it be possible to start KVM earlier in the bootup process so that the VM is ready to accept the AD commands?
The only impossible option is to separate the VM from the host as this box is an absolute powerhouse and I can't afford to build another hypervisor.
What do you think of it?
boot active-directory nsswitch winbind
add a comment |
I have a Debian 9 box that's joined to a Windows AD domain.
The main domain controller runs in a VM on this Debian box alongside another physical backup DC.
As it stands the backup DC is out of action at the moment which means that my Debian box is failing to boot due to the configuration of the nsswitch.conf file.
Currently my nsswitch.conf file looks like:
passwd: files winbind
group: files winbind
shadow: files winbind
gshadow: files
If I change it using a recovery shell to use compat then I can login using the local account on the Debian box and then can change it back to use files and winbind after the machine and VM have booted.
I'm debating the best way to fix this going forward, as it will be a while before I rebuild the backup DC.
I've added compat to the end of each of the lines in the nsswitch.conf file which sort of works but yields very long startup times.
I was wondering if it would be possible to run a script during boot that temporarily changed the file and then changed it back after boot?
I was think something like:
cp -f /etc/nsswitch.conf.temp /etc/nsswitch.conf for the startup and then
cp -f /etc/nsswitch.conf.proper /etc/nsswitch.conf for the end of the boot?
I've never looked into startup scripts before and I can't seem to find much useful information on Google about how to find the "end of the boot process"
Alternatively would it be possible to start KVM earlier in the bootup process so that the VM is ready to accept the AD commands?
The only impossible option is to separate the VM from the host as this box is an absolute powerhouse and I can't afford to build another hypervisor.
What do you think of it?
boot active-directory nsswitch winbind
I have a Debian 9 box that's joined to a Windows AD domain.
The main domain controller runs in a VM on this Debian box alongside another physical backup DC.
As it stands the backup DC is out of action at the moment which means that my Debian box is failing to boot due to the configuration of the nsswitch.conf file.
Currently my nsswitch.conf file looks like:
passwd: files winbind
group: files winbind
shadow: files winbind
gshadow: files
If I change it using a recovery shell to use compat then I can login using the local account on the Debian box and then can change it back to use files and winbind after the machine and VM have booted.
I'm debating the best way to fix this going forward, as it will be a while before I rebuild the backup DC.
I've added compat to the end of each of the lines in the nsswitch.conf file which sort of works but yields very long startup times.
I was wondering if it would be possible to run a script during boot that temporarily changed the file and then changed it back after boot?
I was think something like:
cp -f /etc/nsswitch.conf.temp /etc/nsswitch.conf for the startup and then
cp -f /etc/nsswitch.conf.proper /etc/nsswitch.conf for the end of the boot?
I've never looked into startup scripts before and I can't seem to find much useful information on Google about how to find the "end of the boot process"
Alternatively would it be possible to start KVM earlier in the bootup process so that the VM is ready to accept the AD commands?
The only impossible option is to separate the VM from the host as this box is an absolute powerhouse and I can't afford to build another hypervisor.
What do you think of it?
boot active-directory nsswitch winbind
boot active-directory nsswitch winbind
edited Feb 3 at 18:56
Rui F Ribeiro
40.2k1479135
40.2k1479135
asked Feb 3 at 18:52
Steve BrownSteve Brown
134
134
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f498472%2fshould-i-run-a-boot-script-on-nsswitch-conf-debian-9%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f498472%2fshould-i-run-a-boot-script-on-nsswitch-conf-debian-9%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown