You are not logged in.
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
Probably your backup did not have group named 'vector'. And its trying to run as that group.
Offline
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
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
'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!
Last edited by C. M. Harlequin (2014-06-15 10:38:55)
διπλοῦν ὁρῶσιν οἱ μαθόντες γράμματα.
Offline