Skip to content

[tacacs] NSS plugin should support user without secondary_grp #1627

@taoyl-ms

Description

@taoyl-ms

Description

Current user adding logic in TACACS NSS module checks if user->secondary_grp exists and only when it has none-NULL value calls the following command to create user:

snprintf(buf, len, "useradd -G %s \"%s\" -g %d -c \"%s\" -d /home/%s -m -s %s",
    user->secondary_grp, name, user->gid, user->info, name, user->shell);

Because of this, currently in order to create a user belonging to only one group, we'll need to specify group id in user->gid and group name in user->secondary_grp again.

Should support cases that user->secondary_grp is empty and create user account without using -G correspondingly.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions