You are not logged in.

#1 2014-06-14 16:37:28

C. M. Harlequin
Member
From: Australia
Registered: 2011-12-23
Posts: 35

[SOLVED] sudo: unable to set runas group vector: Invalid argument

I recently made the (idiotic) mistake of overwriting my /etc/passwd and /etc/group files, although I managed to restore them from a backup.  Since restarting the machine I'm having the same issue every time I invoke sudo:

sudo: unable to set runas group vector: Invalid argument

I can't find any info on this error. Any ideas on where to start?

Thanks,

-- C. M.

EDIT: I should also note that this is a headless machine that I'm accessing via SSH.

Last edited by C. M. Harlequin (2014-06-15 10:35:33)


διπλοῦν ὁρῶσιν οἱ μαθόντες γράμματα.

Offline

#2 2014-06-14 16:43:44

amish
Member
Registered: 2014-05-10
Posts: 470

Re: [SOLVED] sudo: unable to set runas group vector: Invalid argument

Probably your backup did not have group named 'vector'. And its trying to run as that group.

Offline

#3 2014-06-14 18:39:41

C. M. Harlequin
Member
From: Australia
Registered: 2011-12-23
Posts: 35

Re: [SOLVED] sudo: unable to set runas group vector: Invalid argument

Thanks for the reply, Amish.

It's my understanding that the 'group vector' is a term that refers to the specific set of groups to which a user has membership, rather than a specific group named 'vector'.  Although, I could be mistaken.

From the sudo manpage:

The -P (preserve group vector) option causes sudo to preserve the user's group vector unaltered. By default, sudo will initialize the group vector to the list of groups the target user is in. The real and effective group IDs, however, are still set to match the target user.

Similarly, from the sudoers manpage:

By default, sudo will initialize the group vector to the list of groups the target user is in. When preserve_groups is set, the user's existing group vector is left unaltered. The real and effective group IDs, however, are still set to match the target user. This flag is off by default.

But the manpages don't offer me much, I'm still clueless as to why I'm getting the error.

EDIT: although using the -P flag seems to allow sudo to run without error

Last edited by C. M. Harlequin (2014-06-14 18:42:39)


διπλοῦν ὁρῶσιν οἱ μαθόντες γράμματα.

Offline

#4 2014-06-14 23:13:35

ukhippo
Member
From: Non-paged pool
Registered: 2014-02-21
Posts: 366

Re: [SOLVED] sudo: unable to set runas group vector: Invalid argument

I'd guess that /etc/group file is corrupt or out of sync with /etc/gshadow
Does each group have the same membership in both files?

grep . /etc/group /etc/gshadow | sort -t: -k2

Might help make it easier to see.
Does “id root” give the right groups list for root?
Did you do a “grpck” and “pwck” after you restored the files? If not, do they report any errors if you run them now?

Offline

#5 2014-06-15 10:34:56

C. M. Harlequin
Member
From: Australia
Registered: 2011-12-23
Posts: 35

Re: [SOLVED] sudo: unable to set runas group vector: Invalid argument

'grpck' identified an invalid line for root in /etc/group.  So when sudo was trying to initialise the group vector for the root environment, it was reciving an invalid argument from /etc/group, hence the error.

Problem solved, thanks for the tip ukhippo! smile

Last edited by C. M. Harlequin (2014-06-15 10:38:55)


διπλοῦν ὁρῶσιν οἱ μαθόντες γράμματα.

Offline

Board footer

Powered by FluxBB