[External] Re: how to add a new user using ipmitool

Lei Yu yulei.sh at bytedance.com
Sun Apr 11 17:17:55 AEST 2021


We had an issue that the HOME directory for the users could not be
moved, probably due to the overlayfs.
The issue could be workarounded by not creating HOME and use /tmp instead.

It's a minor change in user_mgr.cpp in phosphor-user-manager, that
changes the arguments passed to `useradd` and `usermod`.
It's just a workaround so we did not send the patch upstream.

On Thu, Apr 8, 2021 at 2:08 PM sandeep sharma <sandeepajesh at gmail.com> wrote:
>
> Can some experts help us here?
>
> On Tue, Apr 6, 2021 at 10:38 PM sandeep sharma <sandeepajesh at gmail.com> wrote:
>>
>> Thanks Tom,
>>
>> I tried to execute these commands but no success. Looks like I am missing something related to IPMI functionality .
>> To debug it further I added ipmitool into openBMC build and tried to execute IPMI commands from the openbmc shell. But except for 0x6 0x1, 0x06 0x2 & 0x6 0x03 other commands are not working. Debug logs below. Any inputs are much appreciated.
>> .
>>
>> root at cn81xx-obmc:~# systemctl | grep -i "ipmi"
>>   phosphor-ipmi-host.service                                                                                             loaded active     running         Phosphor Inband IPMI
>>   phosphor-ipmi-kcs at ipmi-kcs3.service                                                                                    loaded active     running         Phosphor IPMI KCS DBus Bridge
>>   phosphor-ipmi-net at eth0.service                                                                                         loaded active     running         Network IPMI daemon
>>   xyz.openbmc_project.Logging.IPMI.service                                                                               loaded active     running         IPMI SEL Logging Service
>>   system-phosphor\x2dipmi\x2dkcs.slice                                                                                   loaded active     active          system-phosphor\x2dipmi\x2dkcs.slice
>>   system-phosphor\x2dipmi\x2dnet.slice                                                                                   loaded active     active          system-phosphor\x2dipmi\x2dnet.slice
>>   phosphor-ipmi-net at eth0.socket                                                                                          loaded active     running         phosphor-ipmi-net at eth0.socket
>> root at cn81xx-obmc:~#
>>
>> root at cn81xx-obmc:~# ipmitool raw 0x6 0x1
>>  00 00 80 00 02 00 f7 04 00 00 00 00 00 00 00
>> root at cn81xx-obmc:~# ipmitool raw 0x6 0x25
>> Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0 cmd=0x25 rsp=0xff): Unspecified error
>> root at cn81xx-obmc:~# ipmitool raw 0x6 0x25 -vvvvv
>> Loading IANA PEN Registry...
>>   Allocating     29 entries
>>   [    27] 16777214 | A Debug Assisting Company, Ltd.
>>   [    26]    52538 | Ampere Computing
>>   [    25]    51974 | Raptor Computing Systems, LLC
>>   [    24]    49769 | YADRO
>>   [    23]    49150 | Vertiv Co
>>   [    22]    48512 | Inspur Group Co.,Ltd.
>>   [    21]    48482 | Linaro Ltd
>>   [    20]    45065 | Insyde
>>   [    19]    40981 | Facebook, Inc.
>>   [    18]    40092 | Wiwynn Corporation
>>   [    17]    33049 | Mellanox Technologies LTD
>>   [    16]    20974 | American Megatrends, Inc
>>   [    15]    19046 | Lenovo Enterprise Business Group
>>   [    14]    11183 | Mitac International Corp.
>>   [    13]    11129 | Google, Inc.
>>   [    12]     8554 | Departement Elektrotechnik, ETH Zuerich
>>   [    11]     7244 | Quanta Computer Inc.
>>   [    10]     6569 | INVENTEC CORPORATION
>>   [     9]     4128 | ARM Ltd.
>>   [     8]     2487 | Phoenix Technologies Ltd.
>>   [     7]     1694 | HCL Technologies Limited
>>   [     6]     1271 | Ciena Corporation
>>   [     5]      674 | Dell Inc.
>>   [     4]      343 | Intel Corporation
>>   [     3]        2 | IBM (https://w3.ibm.com/standards )
>>   [     2]        0 | Reserved
>>   [     1]  1048575 | Unspecified
>>   [     0]        0 | Unknown
>> Running Get PICMG Properties my_addr 0x20, transit 0, target 0
>> Error response 0xc1 from Get PICMG Properties
>> Running Get VSO Capabilities my_addr 0x20, transit 0, target 0
>> Invalid completion code received: Invalid command
>> Acquire IPMB address
>> Discovered IPMB address 0x0
>> Interface address: my_addr 0x20 transit 0:0 target 0x20:0 ipmb_target 0
>>
>> RAW REQ (channel=0x0 netfn=0x6 lun=0x0 cmd=0x25 data_len=0)
>> Unable to send RAW command (channel=0x0 netfn=0x6 lun=0x0 cmd=0x25 rsp=0xff): Unspecified error
>> root at cn81xx-obmc:~#
>>
>> root at cn81xx-obmc:~# ipmitool channel info 1
>> Channel 0x1 info:
>>   Channel Medium Type   : 802.3 LAN
>>   Channel Protocol Type : IPMB-1.0
>>   Session Support       : multi-session
>>   Active Session Count  : 0
>>   Protocol Vendor ID    : 7154
>>   Volatile(active) Settings
>>     Alerting            : enabled
>>     Per-message Auth    : enabled
>>     User Level Auth     : enabled
>>     Access Mode         : always available
>>   Non-Volatile Settings
>>     Alerting            : enabled
>>     Per-message Auth    : enabled
>>     User Level Auth     : enabled
>>     Access Mode         : always available
>> root at cn81xx-obmc:~#
>>
>> root at cn81xx-obmc:~# ipmitool user list 1
>> ID  Name     Callin  Link Auth IPMI Msg   Channel Priv Limit
>> 1   root             false   true       true       ADMINISTRATOR
>> 2                    true    false      false      NO ACCESS
>> 3                    true    false      false      NO ACCESS
>> 4                    true    false      false      NO ACCESS
>> 5                    true    false      false      NO ACCESS
>> 6                    true    false      false      NO ACCESS
>> 7                    true    false      false      NO ACCESS
>> 8                    true    false      false      NO ACCESS
>> 9                    true    false      false      NO ACCESS
>> 10                   true    false      false      NO ACCESS
>> 11                   true    false      false      NO ACCESS
>> 12                   true    false      false      NO ACCESS
>> 13                   true    false      false      NO ACCESS
>> 14                   true    false      false      NO ACCESS
>> 15                   true    false      false      NO ACCESS
>> root at cn81xx-obmc:~# ipmitool user summary 1
>> Maximum IDs    : 15
>> Enabled User Count  : 1
>> Fixed Name Count    : 0
>> root at cn81xx-obmc:~#
>>
>> root at cn81xx-obmc:~# ipmitool -I dbus user set name 2 newuser
>> Set User Name command failed (user 2, name newuser): Unspecified error
>> root at cn81xx-obmc:~#
>>
>> thx
>> sandeep S
>>
>> On Tue, Apr 6, 2021 at 7:38 PM Tom Joseph <rushtotom at gmail.com> wrote:
>>>
>>> docs/IPMITOOL-cheatsheet.md at master · openbmc/docs (github.com)
>>>
>>> On Mon, Apr 5, 2021 at 11:17 PM sandeep sharma <sandeepajesh at gmail.com> wrote:
>>>>
>>>> We are working on a prototype based on ast2600  and can someone please help me with commands to create a user using ipmitool in openbmc? Is there any link which I can refer for all commands related to ipmi?
>>>>
>>>> Steps I have tried:-
>>>> root at cn81xx-obmc:~# ipmitool user summary 1
>>>> Maximum IDs    : 15
>>>> Enabled User Count  : 1
>>>> Fixed Name Count    : 0
>>>> root at cn81xx-obmc:~# ipmitool user list 1
>>>> ID  Name     Callin  Link Auth IPMI Msg   Channel Priv Limit
>>>> 1   root             false   true       true       ADMINISTRATOR
>>>> 2                    true    false      false      NO ACCESS
>>>> 3                    true    false      false      NO ACCESS
>>>> 4                    true    false      false      NO ACCESS
>>>> 5                    true    false      false      NO ACCESS
>>>> 6                    true    false      false      NO ACCESS
>>>> 7                    true    false      false      NO ACCESS
>>>> 8                    true    false      false      NO ACCESS
>>>> 9                    true    false      false      NO ACCESS
>>>> 10                   true    false      false      NO ACCESS
>>>> 11                   true    false      false      NO ACCESS
>>>> 12                   true    false      false      NO ACCESS
>>>> 13                   true    false      false      NO ACCESS
>>>> 14                   true    false      false      NO ACCESS
>>>> 15                   true    false      false      NO ACCESS
>>>> root at cn81xx-obmc:~# ipmitool user set name 2 newuser
>>>> Set User Name command failed (user 2, name newuser): Unspecified error
>>>> root at cn81xx-obmc:~# ipmitool user set name 2 newuser -vv
>>>> Loading IANA PEN Registry...
>>>> Running Get PICMG Properties my_addr 0x20, transit 0, target 0
>>>> Error response 0xc1 from Get PICMG Properties
>>>> Running Get VSO Capabilities my_addr 0x20, transit 0, target 0
>>>> Invalid completion code received: Invalid command
>>>> Acquire IPMB address
>>>> Discovered IPMB address 0x0
>>>> Interface address: my_addr 0x20 transit 0:0 target 0x20:0 ipmb_target 0
>>>>
>>>> Set User Name command failed (user 2, name newuser): Unspecified error
>>>> root at cn81xx-obmc:~#
>>>>
>>>> --
>>>> Thx-
>>>> Sandeep S
>>
>>
>>
>> --
>> Thx-
>> Sandeep S
>
>
>
> --
> Thx-
> Sandeep S



-- 
BRs,
Lei YU


More information about the openbmc mailing list