You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by li jerry <di...@hotmail.com> on 2020/11/23 05:49:21 UTC

回复: Password reset for CentOS 8 Template

HI Hean

Network manager supports three ways to get DHCP: dhclient, dhcpcd and internal;
rhel7/centos7 default is dhclient
centos8 default is internal;

Cloud init and cloudstack password scripts depend on dhclient;

So we need to modify / etc / network manager/ NetworkManager.conf
[main]
##Add the following section
dhcp=dhclient

-Jerry


发件人: Hean Seng <he...@gmail.com>
发送时间: Sunday, November 22, 2020 2:01:49 AM
收件人: users@cloudstack.apache.org <us...@cloudstack.apache.org>
主题: Re: Password reset for CentOS 8 Template

Hi

I put the script in /etc/NetworkManager/dispatcher.d , the script run , but
keep say

Found password server IP x.x.x.1 in nmcli output

Sending request to password server at x.x.x.1

Failed to send request to password server at x.x.x.1

Did not need to change password.

the file  /etc/sysconfig/network-scripts/ifcfg-eth0   is exist

this x.x.x.1  is the Gw IP , which is not right, it should get the IP from
VirtualRouter IP .




On Tue, Nov 17, 2020 at 7:49 PM Craig Dunn <se...@googlemail.com.invalid>
wrote:

> Hey,
>
> I created a Centos 8 template a few months back for our cloudstack 4.11
> install.
>
> I made a few notes on the install, Not sure exactly what issue you were
> having but mine was the script tried to run before network manager had
> finished starting. Notes I made I pasted below, hope it helps
>
> Centos 8 and above has changed the way in which its networking is handled.
> The Network-Scripts has been deprecated and replaced with Network Manager
> which handles all interfaces
>
>
>
> This means that placing the Cloudstack password management script inside
> /etc/init.d errors saying that Network Manager was not started. This is due
> to the fact that the script runs on bootup and runs before Network Manager
> starts so the password does not get changed.
>
>
>
> If you try this you can see the error in /var/log/messages and you run:
>
>
>
> cat messages | grep "password"
>
>
>
> To resolve this we need to get the password change script to run after the
> Network Manager service has started.
>
>
>
> Navigate to /etc/NetworkManager/dispatcher.d
>
>
>
> Create a file called ifup-local
>
>
>
> And paste the script inside the file
>
> Thanks
>
> On Fri, 13 Nov 2020 at 04:24, Hean Seng <he...@gmail.com> wrote:
>
> > Hi
> >
> > Is there anybody do the template for CentOS 8 before,  i not able to get
> it
> > work for password reset .  either in Script or Cloud-Init.      It is due
> > to CentOS 8 cannot disable NetworkManager, and Cloudstack data source py
> ,
> > keep getting data from  NetworkManager and there  seem not able to get
> the
> > VR ip there.
> >
> > Anybody have experience on CentOS 8 template, pelase share the
> experience .
> >
> >
> > --
> > Regards,
> > Hean Seng
> >
>


--
Regards,
Hean Seng

回复: Password reset for CentOS 8 Template

Posted by li jerry <di...@hotmail.com>.
Centos8 does not have "network scripts" installed,But you can install it manually


dnf install -y -q network-scripts

systemctl disable NetworkManager
systemctl enable network-scripts
systemctl start network-scripts

After network scripts is started, the files you need will be created automatically under /var/lib/dhcp/

-Jerry

发件人: Hean Seng<ma...@gmail.com>
发送时间: 2020年11月23日 14:02
收件人: users@cloudstack.apache.org<ma...@cloudstack.apache.org>
主题: Re: Password reset for CentOS 8 Template

Hi Jerry,

I can try your option .  Tht might be good idea.

What I am trying to do now is at the  Change Password Script, manually run
dhclient command, and let it
generate the  /var/lib/dhclient/dhclient.leases,

Then mondiy the change password script to read
from /var/lib/dhclient/dhclient.leases




On Mon, Nov 23, 2020 at 1:49 PM li jerry <di...@hotmail.com> wrote:

> HI Hean
>
>
>
> Network manager supports three ways to get DHCP: dhclient, dhcpcd and
> internal;
>
> rhel7/centos7 default is dhclient
>
> centos8 default is internal;
>
>
>
> Cloud init and cloudstack password scripts depend on dhclient;
>
>
>
> So we need to modify / etc / network manager/ NetworkManager.conf
>
> [main]
>
> ##Add the following section
>
> dhcp=dhclient
>
>
>
> -Jerry
>
>
>
> *发件人**:* Hean Seng <he...@gmail.com>
> *发送时间**:* Sunday, November 22, 2020 2:01:49 AM
> *收件人**:* users@cloudstack.apache.org <us...@cloudstack.apache.org>
> *主题**:* Re: Password reset for CentOS 8 Template
>
>
>
> Hi
>
> I put the script in /etc/NetworkManager/dispatcher.d , the script run , but
> keep say
>
> Found password server IP x.x.x.1 in nmcli output
>
> Sending request to password server at x.x.x.1
>
> Failed to send request to password server at x.x.x.1
>
> Did not need to change password.
>
> the file  /etc/sysconfig/network-scripts/ifcfg-eth0   is exist
>
> this x.x.x.1  is the Gw IP , which is not right, it should get the IP from
> VirtualRouter IP .
>
>
>
>
> On Tue, Nov 17, 2020 at 7:49 PM Craig Dunn
> <se...@googlemail.com.invalid>
> wrote:
>
> > Hey,
> >
> > I created a Centos 8 template a few months back for our cloudstack 4.11
> > install.
> >
> > I made a few notes on the install, Not sure exactly what issue you were
> > having but mine was the script tried to run before network manager had
> > finished starting. Notes I made I pasted below, hope it helps
> >
> > Centos 8 and above has changed the way in which its networking is
> handled.
> > The Network-Scripts has been deprecated and replaced with Network Manager
> > which handles all interfaces
> >
> >
> >
> > This means that placing the Cloudstack password management script inside
> > /etc/init.d errors saying that Network Manager was not started. This is
> due
> > to the fact that the script runs on bootup and runs before Network
> Manager
> > starts so the password does not get changed.
> >
> >
> >
> > If you try this you can see the error in /var/log/messages and you run:
> >
> >
> >
> > cat messages | grep "password"
> >
> >
> >
> > To resolve this we need to get the password change script to run after
> the
> > Network Manager service has started.
> >
> >
> >
> > Navigate to /etc/NetworkManager/dispatcher.d
> >
> >
> >
> > Create a file called ifup-local
> >
> >
> >
> > And paste the script inside the file
> >
> > Thanks
> >
> > On Fri, 13 Nov 2020 at 04:24, Hean Seng <he...@gmail.com> wrote:
> >
> > > Hi
> > >
> > > Is there anybody do the template for CentOS 8 before,  i not able to
> get
> > it
> > > work for password reset .  either in Script or Cloud-Init.      It is
> due
> > > to CentOS 8 cannot disable NetworkManager, and Cloudstack data source
> py
> > ,
> > > keep getting data from  NetworkManager and there  seem not able to get
> > the
> > > VR ip there.
> > >
> > > Anybody have experience on CentOS 8 template, pelase share the
> > experience .
> > >
> > >
> > > --
> > > Regards,
> > > Hean Seng
> > >
> >
>
>
> --
> Regards,
> Hean Seng
>


--
Regards,
Hean Seng


Re: Password reset for CentOS 8 Template

Posted by Hean Seng <he...@gmail.com>.
Hi Jerry,

I can try your option .  Tht might be good idea.

What I am trying to do now is at the  Change Password Script, manually run
dhclient command, and let it
generate the  /var/lib/dhclient/dhclient.leases,

Then mondiy the change password script to read
from /var/lib/dhclient/dhclient.leases




On Mon, Nov 23, 2020 at 1:49 PM li jerry <di...@hotmail.com> wrote:

> HI Hean
>
>
>
> Network manager supports three ways to get DHCP: dhclient, dhcpcd and
> internal;
>
> rhel7/centos7 default is dhclient
>
> centos8 default is internal;
>
>
>
> Cloud init and cloudstack password scripts depend on dhclient;
>
>
>
> So we need to modify / etc / network manager/ NetworkManager.conf
>
> [main]
>
> ##Add the following section
>
> dhcp=dhclient
>
>
>
> -Jerry
>
>
>
> *发件人**:* Hean Seng <he...@gmail.com>
> *发送时间**:* Sunday, November 22, 2020 2:01:49 AM
> *收件人**:* users@cloudstack.apache.org <us...@cloudstack.apache.org>
> *主题**:* Re: Password reset for CentOS 8 Template
>
>
>
> Hi
>
> I put the script in /etc/NetworkManager/dispatcher.d , the script run , but
> keep say
>
> Found password server IP x.x.x.1 in nmcli output
>
> Sending request to password server at x.x.x.1
>
> Failed to send request to password server at x.x.x.1
>
> Did not need to change password.
>
> the file  /etc/sysconfig/network-scripts/ifcfg-eth0   is exist
>
> this x.x.x.1  is the Gw IP , which is not right, it should get the IP from
> VirtualRouter IP .
>
>
>
>
> On Tue, Nov 17, 2020 at 7:49 PM Craig Dunn
> <se...@googlemail.com.invalid>
> wrote:
>
> > Hey,
> >
> > I created a Centos 8 template a few months back for our cloudstack 4.11
> > install.
> >
> > I made a few notes on the install, Not sure exactly what issue you were
> > having but mine was the script tried to run before network manager had
> > finished starting. Notes I made I pasted below, hope it helps
> >
> > Centos 8 and above has changed the way in which its networking is
> handled.
> > The Network-Scripts has been deprecated and replaced with Network Manager
> > which handles all interfaces
> >
> >
> >
> > This means that placing the Cloudstack password management script inside
> > /etc/init.d errors saying that Network Manager was not started. This is
> due
> > to the fact that the script runs on bootup and runs before Network
> Manager
> > starts so the password does not get changed.
> >
> >
> >
> > If you try this you can see the error in /var/log/messages and you run:
> >
> >
> >
> > cat messages | grep "password"
> >
> >
> >
> > To resolve this we need to get the password change script to run after
> the
> > Network Manager service has started.
> >
> >
> >
> > Navigate to /etc/NetworkManager/dispatcher.d
> >
> >
> >
> > Create a file called ifup-local
> >
> >
> >
> > And paste the script inside the file
> >
> > Thanks
> >
> > On Fri, 13 Nov 2020 at 04:24, Hean Seng <he...@gmail.com> wrote:
> >
> > > Hi
> > >
> > > Is there anybody do the template for CentOS 8 before,  i not able to
> get
> > it
> > > work for password reset .  either in Script or Cloud-Init.      It is
> due
> > > to CentOS 8 cannot disable NetworkManager, and Cloudstack data source
> py
> > ,
> > > keep getting data from  NetworkManager and there  seem not able to get
> > the
> > > VR ip there.
> > >
> > > Anybody have experience on CentOS 8 template, pelase share the
> > experience .
> > >
> > >
> > > --
> > > Regards,
> > > Hean Seng
> > >
> >
>
>
> --
> Regards,
> Hean Seng
>


-- 
Regards,
Hean Seng