缺少posixAccounts API信息



我没有看到我的posixAccounts信息从以下链接:https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/get

{
"kind": "admin#directory#user",
"id": "8675309",
"etag": ""UUID"",
"primaryEmail": "email@example.com",
"name": {
"givenName": "Email",
"familyName": "Account",
"fullName": "Email Account"
},
"isAdmin": true,
"isDelegatedAdmin": false,
"lastLoginTime": "2021-08-04T21:11:17.000Z",
"creationTime": "2021-06-16T14:32:35.000Z",
"agreedToTerms": true,
"suspended": false,
"archived": false,
"changePasswordAtNextLogin": false,
"ipWhitelisted": false,
"emails": [
{
"address": "email@example.com",
"primary": true
},
{
"address": "email@example.com.test-google-a.com"
}
],
"phones": [
{
"value": "123-456-7890",
"type": "work"
}
],
"nonEditableAliases": [
"email@example.com.test-google-a.com"
],
"customerId": "id12345",
"orgUnitPath": "/path/to/org",
"isMailboxSetup": true,
"isEnrolledIn2Sv": false,
"isEnforcedIn2Sv": false,
"includeInGlobalAddressList": true
}

从上面的输出中可以看到,没有posixAccount信息。我可以在Apache Directory studio中打开ldap信息,所以我知道它在那里,但是我无法从上面的输出中看到它。因为我可以看到它,所以我尝试使用API中的update函数来更新它。

https://developers.google.com/admin-sdk/directory/reference/rest/v1/users/update

我将此用于有效负载,因为我只是在测试更新gid信息。我使用下面的文档来获取所需的条目详细信息。至少在我看来是这样。

{
"posixAccounts": [
{
"gid": "12345",
}
]
}

https://developers.google.com/admin-sdk/directory/reference/rest/v1/users

我得到了一个200响应,但是当用户做PUT更新时,实际上没有什么变化。

我尝试了一个类似的更新方法从另一个用户在这里,但无济于事:谷歌管理SDK -创建posix属性在现有用户

我可以通过在PUT请求中提供额外的详细信息来解决这个问题:

{
"posixAccounts": [
{
"username": "email(excluding @domain.com)",
"uid": "1234",
"gid": "12345",
"operatingSystemType": "unspecified",
"shell": "/bin/bash",
"gecos": "Firstname Lastname"
"systemId": ""
}
]
}

上面的内容在LDAP中不会反映出来,直到我把"systemId"在那里。所以那部分是必需的。

最新更新