---
name: "ldapsetprimarygroup"
section: "1"
platform: "linux"
package: "ldapscripts"
version: "2.0.8-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/ldapsetprimarygroup"
---

# ldapsetprimarygroup(1)

modifies the gidNumber of a POSIX user or machine account in LDAP (sets a user's primary group in LDAP).

## NAME

ldapsetprimarygroup - modifies the gidNumber of a POSIX user or machine account in LDAP (sets a user's primary group in LDAP).

## SYNOPSIS

**ldapsetprimarygroup** \<username**\|**uid\> \<groupname**\|**gid\>

## OPTIONS

- **\<username \| uid\>**

  The name or uid of the user to modify.

- **\<groupname \| gid\>**

  The new primary group name or gid of the specified user.

## SEE ALSO

[ldapaddusertogroup(1)](/ldapaddusertogroup/1.md), [ldapdeleteuserfromgroup(1)](/ldapdeleteuserfromgroup/1.md), [ldapscripts(5)](/ldapscripts/5.md).

## AVAILABILITY

The ldapscripts are provided under the GNU General Public License v2 (see COPYING for more details). The latest version of the ldapscripts is available on : **http://contribs.martymac.org**

## BUGS

No bug known.
