Delete interface is exposed as part of the user object itself. Sample busctl command to do the delete of an user under phosphor-user-manager

busctl call xyz.openbmc_project.User.Manager /xyz/openbmc_project/user/<username> xyz.openbmc_project.Object.Delete Delete

Regards,

Richard


On 12/16/2019 2:31 PM, 南野ムルシエラゴ wrote:
Hi Thomaiyar

Thanks for your advices. Acctually I want to add a user dynamically when after openbmc is running, not in the image building time. And I do some trials, and it seems to work.
1. After login in as root, I use busctl to call the CreateUser method of phosphor-user-manager
2. After that, I use passwd command to change user liu3's password. The password can not be too simple, and I set password as "qwertyuiop[]123".
3. Then I can see two user in /xyz/openbmc_project/user. They are root and liu3
4. In another computer(accutally I run openbmc in qemu, and "another computer" means the host system), I try to access the openbmc with curl and ipmitool. And it seems to work.
Although I can add a user, but I still do not know how to delete the added user. I haven't found a deleteuser d-bus interface like createuser interface.

Best Regards!
Liu Hongwei
------------------ 原始邮件 ------------------
发件人: "Thomaiyar, Richard Marian"<richard.marian.thomaiyar@linux.intel.com>;
发送时间: 2019年12月16日(星期一) 下午3:18
收件人: "南野ムルシエラゴ"<1181052146@qq.com>;"openbmc"<openbmc@lists.ozlabs.org>;
主题: Re: How can I add a user for openbmc and remove the default root user?

Hi Liu,

Please refer earlier response on the same

https://lists.ozlabs.org/pipermail/openbmc/2019-June/016515.html

Lately i am seeing many people asking for this password override for
IPMI, Will try to override the same using bbclass for ipmi password too

Regards,

Richard

On 12/14/2019 3:27 PM, 南野ムルシエラゴ wrote:
> Greetings!
>     I am using openbmc, and I want to remove the default root user and
> add a new user.
>     I use useradd add a user, I can use curl with this username and
> passwd to connect to openbmc, But when I use ipmitool, it fails
>     Can any one tell me what can I  do?
>
> Best Regards!
> Liu Hongwei