Re: Re: How can I add a user for openbmc and remove the default root user?

Thomaiyar, Richard Marian richard.marian.thomaiyar at linux.intel.com
Wed Dec 18 23:42:38 AEDT 2019


Hi Gunnar,

Yes root user can't be deleted (basically uid 0), can't be deleted. The 
method works for other users only, like in case Liu, he wants to delete 
the newly created user.

Regards,

Richard


On 12/18/2019 2:38 AM, Gunnar Mills wrote:
>
> On 12/16/2019 7:44 AM, Thomaiyar, Richard Marian wrote:
>>
>> 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
>>
>>
>
> I am missing something here.. This does not work for me. I didn't 
> think we allowed removing the root user, which is why it is disabled 
> on the WebUI? If we do allow deleting the root user, should this be 
> allowed from the WebUI?
>
> When sshed as root:
> busctl call xyz.openbmc_project.User.Manager 
> /xyz/openbmc_project/user/root xyz.openbmc_project.Object.Delete Delete
> Call failed: The operation failed internally.
>
> In the journal I see
> Dec 17 20:57:56 w37 phosphor-user-manager[220]: userdel: user root is 
> currently used by process 1
> Dec 17 20:57:56 w37 phosphor-user-manager[220]: The operation failed 
> internally.
> Dec 17 20:57:56 w37 phosphor-user-manager[220]: User delete failed
> Dec 17 20:57:56 w37 phosphor-user-manager[220]: The operation failed 
> internally.
>
>
> When sshed as an "Administrator" role account,  with the same call:
> Call failed: Access denied
>
> NOTE: As an "Administrator" role I can't delete a user using "busctl 
> call" only from the Redfish/WebUI, am I able to.
>
> Thanks!
> Gunnar


More information about the openbmc mailing list