计算机adminstor用户不见了,Win10管理员账户不见了如何用Administrator登录

Win10管理员账户不见了如何用Administrator登录?很多Win10用户注销了当前用户,想以Administrator登录Win10系统进行操作,但发现系统在注销后,没有Administrator用户账号可选,找不到Administrator用户的登入选项,不知道该如何处理,下面小编就和大家分享下Win10管理员账户不见了使用Administrator登录的方法。

1、在桌面“此电脑”右键菜单中,点击管理,进入计算机管理。

baac0227b879eddfdd5b0e8b10c3832d.png

2、在计算机管理员,找到“本地用户组”。

2a8ffe09726599c8ef76b165924804a7.png

3、点击“本地用户组”-“用户”,在右侧可以看到Administrator用户与当前用户。

1ceeaf791815b1c223d9c7748fb99a7e.png

4、选中Administrator用户,右键-属性。

53d8cbc4d1c1cf88c019c7301e79ba34.png

5、可以看到Administrator被禁用了,这是Win10为了保护系统安全,默认将Administrator禁用。

35c25feaa229422cc8c7e212a827bec2.png

6、将“账户已禁用”前面的√去掉。点击确定。

6403d358c6a301688e5f3d9b18c13481.png

7、再次注销电脑当前用户,就可以看到Administrator管理账号出现了,可以选项Administrator登录Windows10。

464c9b4f23c1719202a83d0afdf0bb9f.png

以上就是Win10管理员账户不见了使用Administrator登录的方法,用户们按上述操作即可登入账户。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
以下是一个示例代码,它会创建一个目录 C:\MyDir,并为该目录添加指定的访问控制项: ```c #include <windows.h> #include <stdio.h> #include <aclapi.h> int main() { DWORD dwRes; PACL pDacl = NULL; PSECURITY_DESCRIPTOR pSD = NULL; SECURITY_ATTRIBUTES sa = {0}; EXPLICIT_ACCESS ea[6]; SID_IDENTIFIER_AUTHORITY sidAuth = SECURITY_NT_AUTHORITY; PSID pGuestSid = NULL, pSystemSid = NULL, pAdminSid = NULL, pInteractiveSid = NULL, pCreatorSid = NULL, pBackupSid = NULL; // 创建 SID if (!AllocateAndInitializeSid(&sidAuth, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_USERS, 0, 0, 0, 0, 0, 0, &pGuestSid)) { printf("AllocateAndInitializeSid error: %u\n", GetLastError()); goto cleanup; } if (!AllocateAndInitializeSid(&sidAuth, 1, SECURITY_LOCAL_SYSTEM_RID, 0, 0, 0, 0, 0, 0, 0, &pSystemSid)) { printf("AllocateAndInitializeSid error: %u\n", GetLastError()); goto cleanup; } if (!AllocateAndInitializeSid(&sidAuth, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_ADMINS, 0, 0, 0, 0, 0, 0, &pAdminSid)) { printf("AllocateAndInitializeSid error: %u\n", GetLastError()); goto cleanup; } if (!AllocateAndInitializeSid(&sidAuth, 1, SECURITY_INTERACTIVE_RID, 0, 0, 0, 0, 0, 0, 0, &pInteractiveSid)) { printf("AllocateAndInitializeSid error: %u\n", GetLastError()); goto cleanup; } if (!AllocateAndInitializeSid(&sidAuth, 1, SECURITY_CREATOR_OWNER_RID, 0, 0, 0, 0, 0, 0, 0, &pCreatorSid)) { printf("AllocateAndInitializeSid error: %u\n", GetLastError()); goto cleanup; } if (!AllocateAndInitializeSid(&sidAuth, 2, SECURITY_BUILTIN_DOMAIN_RID, DOMAIN_ALIAS_RID_BACKUP_OPS, 0, 0, 0, 0, 0, 0, &pBackupSid)) { printf("AllocateAndInitializeSid error: %u\n", GetLastError()); goto cleanup; } // 初始化访问控制项 ZeroMemory(&ea, sizeof(EXPLICIT_ACCESS) * 6); ea[0].grfAccessPermissions = GENERIC_READ | GENERIC_EXECUTE; ea[0].grfAccessMode = DENY_ACCESS; ea[0].grfInheritance = NO_INHERITANCE; ea[0].Trustee.TrusteeForm = TRUSTEE_IS_SID; ea[0].Trustee.TrusteeType = TRUSTEE_IS_GROUP; ea[0].Trustee.ptstrName = (LPTSTR)pGuestSid; ea[1].grfAccessPermissions = GENERIC_ALL; ea[1].grfAccessMode = GRANT_ACCESS; ea[1].grfInheritance = NO_INHERITANCE; ea[1].Trustee.TrusteeForm = TRUSTEE_IS_SID; ea[1].Trustee.TrusteeType = TRUSTEE_IS_WELL_KNOWN_GROUP; ea[1].Trustee.ptstrName = (LPTSTR)pSystemSid; ea[2].grfAccessPermissions = GENERIC_ALL; ea[2].grfAccessMode = GRANT_ACCESS; ea[2].grfInheritance = NO_INHERITANCE; ea[2].Trustee.TrusteeForm = TRUSTEE_IS_SID; ea[2].Trustee.TrusteeType = TRUSTEE_IS_GROUP; ea[2].Trustee.ptstrName = (LPTSTR)pAdminSid; ea[3].grfAccessPermissions = GENERIC_READ | GENERIC_WRITE | GENERIC_EXECUTE; ea[3].grfAccessMode = GRANT_ACCESS; ea[3].grfInheritance = NO_INHERITANCE; ea[3].Trustee.TrusteeForm = TRUSTEE_IS_SID; ea[3].Trustee.TrusteeType = TRUSTEE_IS_GROUP; ea[3].Trustee.ptstrName = (LPTSTR)pInteractiveSid; ea[4].grfAccessPermissions = GENERIC_ALL; ea[4].grfAccessMode = GRANT_ACCESS; ea[4].grfInheritance = NO_INHERITANCE; ea[4].Trustee.TrusteeForm = TRUSTEE_IS_SID; ea[4].Trustee.TrusteeType = TRUSTEE_IS_OWNER; ea[4].Trustee.ptstrName = (LPTSTR)pCreatorSid; ea[5].grfAccessPermissions = GENERIC_READ; ea[5].grfAccessMode = GRANT_ACCESS; ea[5].grfInheritance = NO_INHERITANCE; ea[5].Trustee.TrusteeForm = TRUSTEE_IS_SID; ea[5].Trustee.TrusteeType = TRUSTEE_IS_GROUP; ea[5].Trustee.ptstrName = (LPTSTR)pBackupSid; // 创建安全描述符 dwRes = SetEntriesInAcl(6, ea, NULL, &pDacl); if (dwRes != ERROR_SUCCESS) { printf("SetEntriesInAcl error: %u\n", dwRes); goto cleanup; } pSD = (PSECURITY_DESCRIPTOR)LocalAlloc(LPTR, SECURITY_DESCRIPTOR_MIN_LENGTH); if (!pSD) { printf("LocalAlloc error: %u\n", GetLastError()); goto cleanup; } if (!InitializeSecurityDescriptor(pSD, SECURITY_DESCRIPTOR_REVISION)) { printf("InitializeSecurityDescriptor error: %u\n", GetLastError()); goto cleanup; } if (!SetSecurityDescriptorDacl(pSD, TRUE, pDacl, FALSE)) { printf("SetSecurityDescriptorDacl error: %u\n", GetLastError()); goto cleanup; } sa.nLength = sizeof(SECURITY_ATTRIBUTES); sa.lpSecurityDescriptor = pSD; // 创建目录 if (!CreateDirectory(TEXT("C:\\MyDir"), &sa)) { printf("CreateDirectory error: %u\n", GetLastError()); goto cleanup; } // 清理资源 cleanup: if (pGuestSid) FreeSid(pGuestSid); if (pSystemSid) FreeSid(pSystemSid); if (pAdminSid) FreeSid(pAdminSid); if (pInteractiveSid) FreeSid(pInteractiveSid); if (pCreatorSid) FreeSid(pCreatorSid); if (pBackupSid) FreeSid(pBackupSid); if (pDacl) LocalFree(pDacl); if (pSD) LocalFree(pSD); return 0; } ``` 上述代码中,我们使用了 Windows API 中的一些函数来创建指定的访问控制项,并将这些访问控制项应用到 C:\MyDir 目录上。其中,AllocateAndInitializeSid 函数用于创建 SID,SetEntriesInAcl 函数用于初始化访问控制项,InitializeSecurityDescriptor 函数用于创建安全描述符,SetSecurityDescriptorDacl 函数用于将访问控制列表关联到安全描述符上,CreateDirectory 函数用于创建目录。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值