openstack windows 鏡像密碼注入的問題

來源:互聯網
上載者:User

標籤:openstack windows 鏡像

鏡像製作過程網上一大堆,

問題表現在,可以通過cloudinit注入密碼,但是注入後會提示首次登陸必須更改密碼,Google了下似乎沒人遇到這個問題,首先查看組策略,組策略中沒有類似選項

650) this.width=650;" src="http://s3.51cto.com/wyfs02/M00/87/C4/wKioL1fhQWejizKnAAbFbWp6AVY640.png-wh_500x0-wm_3-wmp_4-s_1057321055.png" title="捕獲.PNG" alt="wKioL1fhQWejizKnAAbFbWp6AVY640.png-wh_50" />

查看原始碼 

setuserpassword.py


 def _change_logon_behaviour(self, username, password_injected=False):

        """Post set password logic


        If the option is activated, force the user to change the

        password at next logon.

        """

        if CONF.first_logon_behaviour == NEVER_CHANGE:

            return


        clear_text = CONF.first_logon_behaviour == CLEAR_TEXT_INJECTED_ONLY

        always = CONF.first_logon_behaviour == ALWAYS_CHANGE

        if always or (clear_text and password_injected):

            osutils = osutils_factory.get_os_utils()

            osutils.change_password_next_logon(username)

得知解決辦法

要麼在 cloud.conf中添加 first_logon_behaviour = NEVER_CHANGE


要麼直接修改這段代碼 。





openstack windows 鏡像密碼注入的問題

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.