![]() My question is what is the cause for this behavior? It seems there is something wrong with this particular user name 'ec2-user' when adding it to a group but I have no idea why this happens. However, if I run groups command without any parameter, which should be the same as groups ec2-user because I logged in as ec2-user, it shows: ec2-user wheelĪnd it tells me ec2-user is not in the group 'docker' yet (actually it was not added to this group because permission error was reported when I tried to access some file belongs to group 'docker').Īnd this does not happen if I try to add the 'ec2-user' into group in this way: sudo gpasswd -a $ dockerĪnd I found I can add other user name like 'harry' into group like below without any problem: sudo gpasswd -a harry docker When I logged in as user ec2-user, and run groups ec2-user, it shows: ec2-user : ec2-user wheel dockerĪnd this seems to indicate the 'ec2-user' was added to group 'docker'. ![]() The example of provide add a few users to the alias. UserAlias :: students student1, student2, student3. We call the alias students and add students 1 through 3. Lets add a few users to a User Alias, after which we will set the sudo privileges for the alias. To add a user and grant full sudo privileges, add the following. UserAlias :: .Use the visudo command to edit the configuration file: sudo visudo. And I want to add the default user 'ec2-user' into group 'docker' like below: sudo groupadd docker In some modern versions of Linux, users are added to the sudoers file to grant privileges. I am using Amazon Linux AMI image doing development.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |