Update (or generate) /etc/ipmi_pass file
Hello everyone
I now want to add a default user to my own machine (I modified obmc-phosphor-image.bbappend, use the useradd… ),
but the new default user cannot use Ipmi. It is because the ipmi_pass file is not updated.
I couldn't find a method/tool to generate ipmi_pass file. So how can I
generate a new ipmi_pass file?
Thanks!
Xiaochao Ma | 马小超
P.R&D | 产品研发部
T: 15269453343
E: <mailto:[email protected]> [email protected]
浪潮商用机器有限公司
Inspur Power Commercial Systems Co., Ltd
北京市海淀区上地信息路2号C座5层
5F,Tower C,No.2 Xinxi Road.Shangdi,Haidian District,Beijing,P.R.China
浪潮商用机器
浪潮服务器
Quoted 11 lines · Xiaochao Ma (马小超)
Hello everyone
I now want to add a default user to my own machine (I modified obmc-phosphor-image.bbappend, use the useradd… ),
but the new default user cannot use Ipmi. It is because the
ipmi_passfile is not updated.I couldn't find a method/tool to generate
ipmi_passfile. So how can I generate a newipmi_passfile?
What I do is to use qemu or a real BMC, adjust the ipmi username/passwords, and then copy the ipmi_pass out.
Sorry I didn't explain some of the methods I tried : (
1. I tried the method you mentioned, but failed.
The length of the password I want to set is 5 digits.
I modified the complexity setting via /etc/pam.d/common-password, but still cannot set a 5-digit password. (The setting for reducing the length requirement failed to take effect)
2. I also tried to temporarily remove pam_cracklib.so in /etc/pam.d/common-pasword so that it does not perform complexity detection. Failed very directly......
-----邮件原件-----
发件人: Lei YU [mailto:[email protected]]
发送时间: 2022年1月6日 14:41
收件人: Xiaochao Ma (马小超) <[email protected]>
抄送: [email protected]
主题: Re: Update (or generate) /etc/ipmi_pass file
Quoted 5 lines · Xiaochao Ma (马小超)
Hello everyone
Quoted 7 lines
I now want to add a default user to my own machine (I modified obmc-phosphor-image.bbappend, use the useradd… ),
but the new default user cannot use Ipmi. It is because the
ipmi_passfile is not updated.I couldn't find a method/tool to generate
ipmi_passfile. So how can I generate a newipmi_passfile?
What I do is to use qemu or a real BMC, adjust the ipmi username/passwords, and then copy the ipmi_pass out.
The OBMC PAM requires the password to be 8 characters in length, and probably requires a numeral as well.
I realize you want to get to a 5 character password.
I recommend you try adding a user with a password that works with the existing rules to see if your automated creation method works. After that you can try creating shorter passwords.
Quoted 28 lines · Xiaochao Ma (马小超)
Sorry I didn't explain some of the methods I tried : (
1. I tried the method you mentioned, but failed.
The length of the password I want to set is 5 digits.
I modified the complexity setting via/etc/pam.d/common-password, but still cannot set a 5-digit password. (The setting for reducing the length requirement failed to take effect)2. I also tried to temporarily remove pam_cracklib.so in
/etc/pam.d/common-paswordso that it does not perform complexity detection. Failed very directly......-----邮件原件-----
发件人: Lei YU [mailto:[email protected]]
发送时间: 2022年1月6日 14:41
收件人: Xiaochao Ma (马小超)<[email protected]>
抄送:[email protected]
主题: Re: Update (or generate)/etc/ipmi_passfileQuoted 11 lines · Xiaochao Ma (马小超)
Hello everyone
I now want to add a default user to my own machine (I modified obmc-phosphor-image.bbappend, use the useradd… ),
but the new default user cannot use Ipmi. It is because the
ipmi_passfile is not updated.I couldn't find a method/tool to generate
ipmi_passfile. So how can I generate a newipmi_passfile?What I do is to use qemu or a real BMC, adjust the ipmi username/passwords, and then copy the
ipmi_passout.
Signature · 6 lines
Johnathan Mantey Senior Software Engineer *azad te**chnology partners* Contributing to Technology Innovation since 1992 Phone: (503) 712-6764 Email: [email protected]
Even you set minlen=0 in /etc/pam.d/common-password, the password length will still be checked by pam-cracklib. Pam-cracklib will call FascistCheck() function of cracklib, and inside cracklib, it will call FascistLookUser(), which also checkes the password length and there is no way to bypass it unless you modify cracklib code. The minimum length forced by cracklib is 6.
FascistLookUser() also contain other implicit conditions your password must met. Please also be careful about them.
Of course, you can comment out the pam_cracklib.so to bypass all these checks.
From: openbmc <[email protected]> On Behalf Of Johnathan Mantey
Sent: Friday, January 7, 2022 00:55
To: Xiaochao Ma (马小超) <[email protected]>; [email protected]
Cc: [email protected]
Subject: Re: 答复: Update (or generate) /etc/ipmi_pass file
The OBMC PAM requires the password to be 8 characters in length, and probably requires a numeral as well.
I realize you want to get to a 5 character password.
I recommend you try adding a user with a password that works with the existing rules to see if your automated creation method works. After that you can try creating shorter passwords. On 1/5/22 23:02, Xiaochao Ma (马小超) wrote:
Sorry I didn't explain some of the methods I tried : (
1. I tried the method you mentioned, but failed.
The length of the password I want to set is 5 digits.
I modified the complexity setting via /etc/pam.d/common-password, but still cannot set a 5-digit password. (The setting for reducing the length requirement failed to take effect)
2. I also tried to temporarily remove pam_cracklib.so in /etc/pam.d/common-pasword so that it does not perform complexity detection. Failed very directly......
-----邮件原件-----
发件人: Lei YU [mailto:[email protected]]
发送时间: 2022年1月6日 14:41
收件人: Xiaochao Ma (马小超) <[email protected]><mailto:[email protected]>
抄送: [email protected]<mailto:[email protected]>
主题: Re: Update (or generate) /etc/ipmi_pass file
On Thu, Jan 6, 2022 at 11:39 AM Xiaochao Ma (马小超) <[email protected]><mailto:[email protected]> wrote:
Hello everyone
I now want to add a default user to my own machine (I modified
obmc-phosphor-image.bbappend, use the useradd… ),
but the new default user cannot use Ipmi. It is because the ipmi_pass file is not updated.
I couldn't find a method/tool to generate ipmi_pass file. So how can I generate a new ipmi_pass file?
What I do is to use qemu or a real BMC, adjust the ipmi username/passwords, and then copy the ipmi_pass out.
--
Johnathan Mantey
Senior Software Engineer
azad technology partners
Contributing to Technology Innovation since 1992
Phone: (503) 712-6764
Email: [email protected]<mailto:[email protected]>
Thank you for your explanation about cracklib!
What should I do to "comment out" correctly?
(I just started to learn ‘pam’ recently, I may not have enough in-depth understanding)
I once tried to add a ‘#’ to the line containing ‘pam_cracklib.so’ in /etc/common-password.
But when other modules execute pam_get_authtok(), an error will occur...
But I can't go into it...can't find its source code...
发件人: Zhao, Jiaqing [mailto:[email protected]]
发送时间: 2022年1月7日 1:10
收件人: Mantey, JohnathanX <[email protected]>; Xiaochao Ma (马小超) <[email protected]>; [email protected] 抄送: [email protected]
主题: RE: 答复: Update (or generate) /etc/ipmi_pass file
Even you set minlen=0 in /etc/pam.d/common-password, the password length will still be checked by pam-cracklib. Pam-cracklib will call FascistCheck() function of cracklib, and inside cracklib, it will call FascistLookUser(), which also checkes the password length and there is no way to bypass it unless you modify cracklib code. The minimum length forced by cracklib is 6.
FascistLookUser() also contain other implicit conditions your password must met. Please also be careful about them.
Of course, you can comment out the pam_cracklib.so to bypass all these checks.
From: openbmc <[email protected] <mailto:[email protected]> > On Behalf Of Johnathan Mantey
Sent: Friday, January 7, 2022 00:55
To: Xiaochao Ma (马小超) <[email protected] <mailto:[email protected]> >; [email protected] <mailto:[email protected]>
Cc: [email protected] <mailto:[email protected]>
Subject: Re: 答复: Update (or generate) /etc/ipmi_pass file
The OBMC PAM requires the password to be 8 characters in length, and probably requires a numeral as well.
I realize you want to get to a 5 character password.
I recommend you try adding a user with a password that works with the existing rules to see if your automated creation method works. After that you can try creating shorter passwords.
On 1/5/22 23:02, Xiaochao Ma (马小超) wrote:
Sorry I didn't explain some of the methods I tried : (
1. I tried the method you mentioned, but failed.
The length of the password I want to set is 5 digits.
I modified the complexity setting via /etc/pam.d/common-password, but still cannot set a 5-digit password. (The setting for reducing the length requirement failed to take effect)
2. I also tried to temporarily remove pam_cracklib.so in /etc/pam.d/common-pasword so that it does not perform complexity detection. Failed very directly......
-----邮件原件-----
发件人: Lei YU [mailto:[email protected]]
发送时间: 2022年1月6日 14:41
收件人: Xiaochao Ma (马小超) <mailto:[email protected]> <[email protected]> 抄送: [email protected] <mailto:[email protected]> 主题: Re: Update (or generate) /etc/ipmi_pass file
On Thu, Jan 6, 2022 at 11:39 AM Xiaochao Ma (马小超) <mailto:[email protected]> <[email protected]> wrote:
Hello everyone
I now want to add a default user to my own machine (I modified obmc-phosphor-image.bbappend, use the useradd… ),
but the new default user cannot use Ipmi. It is because the ipmi_pass file is not updated.
I couldn't find a method/tool to generate ipmi_pass file. So how can I generate a new ipmi_pass file?
What I do is to use qemu or a real BMC, adjust the ipmi username/passwords, and then copy the ipmi_pass out.
Signature · 6 lines
Johnathan Mantey Senior Software Engineer azad technology partners Contributing to Technology Innovation since 1992 Phone: (503) 712-6764 Email: [email protected] <mailto:[email protected]>
Quoted 5 lines · Jiaqing
Even you set minlen=0 in
/etc/pam.d/common-password, the password length will still be checked by pam-cracklib. Pam-cracklib will callFascistCheck()function of cracklib, and inside cracklib, it will callFascistLookUser(), which also checkes ZjQcmQRYFpfptBannerStart This Message Is From an External Sender
This message came from outside your organization.
ZjQcmQRYFpfptBannerEnd
Quoted 8 lines
Even you set minlen=0 in
/etc/pam.d/common-password, the password length will still be checked by pam-cracklib. Pam-cracklib will callFascistCheck()function of cracklib, and inside cracklib, it will callFascistLookUser(), which also checkes the password length and there is no way to bypass it unless you modify cracklib code. The minimum length forced by cracklib is 6.
FascistLookUser()also contain other implicit conditions your password must met. Please also be careful about them.Of course, you can comment out the pam_cracklib.so to bypass all these checks.
If your /etc/pam.d/common-password file look like this (meta-phosphor/recipes-extended/pam/libpam/pam.d/common-password): https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-extended/pam/libpam/pam.d/common-password
then you should be able to comment out the pam_cracklib.so and pam_ipmicheck.so and pam_pwhistory.so lines
but then you have to remove the "use_authtok" parameter from the pam_unix.so line (or whichever is your first module).
Be sure to:
- keep the pam_unix.so line (it writes the password into /etc/shadow file).
- keep the pam_ipmisave.so line (it writes the password to the etc/ipmi_pass file)
- keep the deny and permit lines as they are.
Good luck,
- Joseph
Quoted 56 lines
*From:* openbmc <[email protected]> *On Behalf Of *Johnathan Mantey *Sent:* Friday, January 7, 2022 00:55
*To:* Xiaochao Ma (马小超) <[email protected]>; [email protected]
*Cc:* [email protected]
*Subject:* Re: 答复: Update (or generate)/etc/ipmi_passfileThe OBMC PAM requires the password to be 8 characters in length, and probably requires a numeral as well.
I realize you want to get to a 5 character password.
I recommend you try adding a user with a password that works with the existing rules to see if your automated creation method works. After that you can try creating shorter passwords.On 1/5/22 23:02, Xiaochao Ma (马小超) wrote:
Sorry I didn't explain some of the methods I tried : (
1. I tried the method you mentioned, but failed.
The length of the password I want to set is 5 digits.
I modified the complexity setting via
/etc/pam.d/common-password, but still cannot set a 5-digit password. (The setting for reducing the length requirement failed to take effect)2. I also tried to temporarily remove pam_cracklib.so in
/etc/pam.d/common-paswordso that it does not perform complexity detection. Failed very directly......-----邮件原件-----
发件人: Lei YU [mailto:[email protected] <mailto:[email protected]>]
发送时间: 2022年1月6日 14:41
收件人: Xiaochao Ma (马小超)<[email protected]> <mailto:[email protected]>
主题: Re: Update (or generate)
/etc/ipmi_passfileOn Thu, Jan 6, 2022 at 11:39 AM Xiaochao Ma (马小超)<[email protected]> <mailto:[email protected]> wrote:
Hello everyone
I now want to add a default user to my own machine (I modified
obmc-phosphor-image.bbappend, use the useradd… ),
but the new default user cannot use Ipmi. It is because the
ipmi_passfile is not updated.I couldn't find a method/tool to generate
ipmi_passfile. So how can I generate a newipmi_passfile?What I do is to use qemu or a real BMC, adjust the ipmi username/passwords, and then copy the
ipmi_passout.Signature · 6 lines
Johnathan Mantey Senior Software Engineer *azad technology partners* Contributing to Technology Innovation since 1992 Phone: (503) 712-6764 Email: [email protected]
thank you for your reply.
I have tried this method and got the result I want, thank you very much!
Maxiaochao
_____
发件人: Joseph Reynolds <[email protected]>
发送时间: 2022年1月19日 10:02
收件人: Zhao, Jiaqing; Mantey, JohnathanX; Xiaochao Ma (马小超); [email protected] 抄送: [email protected]
主题: Re: 答复: Update (or generate) /etc/ipmi_pass file
Quoted 15 lines · Jiaqing
Even you set minlen=0 in
/etc/pam.d/common-password, the password length will still be checked by pam-cracklib. Pam-cracklib will callFascistCheck()function of cracklib, and inside cracklib, it will callFascistLookUser(), which also checkes ZjQcmQRYFpfptBannerStart This Message Is From an External Sender
This message came from outside your organization. ZjQcmQRYFpfptBannerEndEven you set minlen=0 in
/etc/pam.d/common-password, the password length will still be checked by pam-cracklib. Pam-cracklib will callFascistCheck()function of cracklib, and inside cracklib, it will callFascistLookUser(), which also checkes the password length and there is no way to bypass it unless you modify cracklib code. The minimum length forced by cracklib is 6.
Quoted 8 lines
FascistLookUser()also contain other implicit conditions your password must met. Please also be careful about them.Of course, you can comment out the pam_cracklib.so to bypass all these checks.
If your /etc/pam.d/common-password file look like this (meta-phosphor/recipes-extended/pam/libpam/pam.d/common-password):
https://github.com/openbmc/openbmc/blob/master/meta-phosphor/recipes-extended/pam/libpam/pam.d/common-password
then you should be able to comment out the pam_cracklib.so and pam_ipmicheck.so and pam_pwhistory.so lines
but then you have to remove the "use_authtok" parameter from the pam_unix.so line (or whichever is your first module).
Be sure to:
- keep the pam_unix.so line (it writes the password into /etc/shadow file).
- keep the pam_ipmisave.so line (it writes the password to the etc/ipmi_pass file)
- keep the deny and permit lines as they are.
Good luck,
- Joseph
Quoted 61 lines
*From:* openbmc <[email protected]> *On Behalf Of *Johnathan Mantey
*Sent:* Friday, January 7, 2022 00:55
*To:* Xiaochao Ma (马小超) <[email protected]>; [email protected] *Cc:* [email protected]
*Subject:* Re: 答复: Update (or generate)/etc/ipmi_passfileThe OBMC PAM requires the password to be 8 characters in length, and probably requires a numeral as well.
I realize you want to get to a 5 character password.
I recommend you try adding a user with a password that works with the existing rules to see if your automated creation method works. After that you can try creating shorter passwords.On 1/5/22 23:02, Xiaochao Ma (马小超) wrote:
Sorry I didn't explain some of the methods I tried : (
1. I tried the method you mentioned, but failed.
The length of the password I want to set is 5 digits.
I modified the complexity setting via
/etc/pam.d/common-password, but still cannot set a 5-digit password. (The setting for reducing the length requirement failed to take effect)2. I also tried to temporarily remove pam_cracklib.so in
/etc/pam.d/common-paswordso that it does not perform complexity detection. Failed very directly......-----邮件原件-----
发件人: Lei YU [mailto:[email protected] <mailto:[email protected]>]
发送时间: 2022年1月6日 14:41
收件人: Xiaochao Ma (马小超)<[email protected]> <mailto:[email protected]>
主题: Re: Update (or generate)
/etc/ipmi_passfileOn Thu, Jan 6, 2022 at 11:39 AM Xiaochao Ma (马小超)<[email protected]> <mailto:[email protected]> wrote:
Hello everyone
I now want to add a default user to my own machine (I modified
obmc-phosphor-image.bbappend, use the useradd… ),
but the new default user cannot use Ipmi. It is because the
ipmi_passfile is not updated.I couldn't find a method/tool to generate
ipmi_passfile. So how can I generate a newipmi_passfile?What I do is to use qemu or a real BMC, adjust the ipmi username/passwords, and then copy the
ipmi_passout.Signature · 6 lines
Johnathan Mantey Senior Software Engineer *azad technology partners* Contributing to Technology Innovation since 1992 Phone: (503) 712-6764 Email: [email protected]