Recreate user with API same uid/gid
After delete a account(whmapi1 removeacct username=ab123456),I want to recreate the account.
I run the same create user script again:
It will fail on console,I got the error message :
I run the linux command: id ab123456 id: ab123456: No such user How to recreate user use the same uid/gid?
/usr/local/cpanel/bin/whmapi1 createacct username=ab123456 ...............
.................................uid=123456 gid=123456 ...........................
It will fail on console,I got the error message :
metadata:
command: createacct
output:
raw: ~
reason: The requested uid (123456) is already in use
result: 0
version: 1
Cpanel::Exception::UserNotFound/(XID m4gbpc) ??????"ab123456"?????
You do not have a user named "ab123456".
at /usr/local/cpanel/Cpanel/Exception/CORE.pm line 77.
Cpanel::Exception::create("UserNotFound", ARRAY(0x1692410)) called at /usr/local/cpanel/Cpanel/Exception.pm line 30
Cpanel::Exception::__ANON__(__CPANEL_HIDDEN__, ARRAY(0x1692410)) called at /usr/local/cpanel/Cpanel/PwUtils.pm line 25
Cpanel::PwUtils::normalize_to_uid("ab123456") called at /usr/local/cpanel/Cpanel/AccessIds/Utils.pm line 27
Cpanel::AccessIds::Utils::normalize_user_and_groups("ab123456") called at /usr/local/cpanel/Cpanel/AccessIds/SetUids.pm line 19
........................
======================================
I run the linux command: id ab123456 id: ab123456: No such user How to recreate user use the same uid/gid?
-
Hello, To update, it looks like a support ticket was opened to address this issue. The issue was addressed by removing some existing files with that UID from the /var/lve/snapshots/ directory on the system. Thank you. 0
Please sign in to leave a comment.
Comments
1 comment