Hello,
I want to add the user pdupre to the group vboxusers groups vboxusers groups: ‘vboxusers’: no such user
but useradd -m pdupre -G vboxusers
useradd: user 'pdupre' already exists
=========================================================================== Patrick DUPRÉ | | email: pdupre@gmx.com Laboratoire interdisciplinaire Carnot de Bourgogne 9 Avenue Alain Savary, BP 47870, 21078 DIJON Cedex FRANCE Tel: +33 (0)380395988 ===========================================================================
Sorry for the disturbance: usermod -a -G vboxusers pdupre works fine
Sent: Monday, July 20, 2020 at 11:09 PM From: "Patrick Dupre" pdupre@gmx.com To: "fedora" users@lists.fedoraproject.org Subject: adduser to group
Hello,
I want to add the user pdupre to the group vboxusers groups vboxusers groups: ‘vboxusers’: no such user
but useradd -m pdupre -G vboxusers
useradd: user 'pdupre' already exists
=========================================================================== Patrick DUPRÉ | | email: pdupre@gmx.com Laboratoire interdisciplinaire Carnot de Bourgogne 9 Avenue Alain Savary, BP 47870, 21078 DIJON Cedex FRANCE Tel: +33 (0)380395988 =========================================================================== _______________________________________________ users mailing list -- users@lists.fedoraproject.org To unsubscribe send an email to users-leave@lists.fedoraproject.org Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
On Mon, Jul 20, 2020 at 11:11:17PM +0200, Patrick Dupre wrote:
Sorry for the disturbance: usermod -a -G vboxusers pdupre works fine
I have a habit of using gpasswd, instead:
gpasswd -a pdupre vboxusers
because it's easy to forget the -a to usermod. (Or, less likely now, but it used to be that some versions of usermod didn't have that option and silently ignored it, which is a recipe for later confusion!)
In any case, remember you have to log out and back in again for this to take effect.
On 07/20/2020 03:09 PM, Patrick Dupre wrote:
Hello,
I want to add the user pdupre to the group vboxusers groups vboxusers groups: ‘vboxusers’: no such user
What else did you expect? That command is used to list the groups a user is a member of. As vboxusers isn't a user, it can't belong to any groups.
but useradd -m pdupre -G vboxusers
useradd: user 'pdupre' already exists
Again, what else did you expect? The useradd command is used to add a user to the list, and as pdupre is already in the list of users, that's what you should have expected. HTH, HAND.