This is Ubuntu 20.04.1 LTS. I execute the following command to add user &quot;louyang&quot; to group &quot;vboxsf&quot;. $ sudo usermod -G vboxsf -a louyang  The command seems ok without any output. but when I try to list with the following command, $ id uid=1000(louyang) gid=1000(louyang) groups=1000(louyang),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),116(lxd)  It show that I doesn't in that group, why? BTW, the following command may show that I already in that group, which information I should trust, command id? or grep vboxsf /etc/group? $ grep vboxsf /etc/group vboxsf:x:998:louyang
110554
Im not sure why the following have different output. My understanding is that groups without specifying a user give all the groups the currently logged in user is a member of.  jacob@box:~$ groups jacob adm lp dialout cdrom plugdev lpadmin sambashare  jacob@box:~$ groups jacob jacob : jacob   Also what does it mean "groups of the current process" (from the groups man page)? Where are they set up?  NOTE: My distro is Ubuntu.
81393
Suppose I installed ubuntu with the user usr1 then I added usr2. I then create a group grp1 where this 2 users are added. A folder is owned by usr1 and has group grp1. But when I login as usr2 I cannot write. The folder has permissions 755...  usr2@kmserver:/media/data/www$ groups usr1 usr1 : grp1 ... usr2@kmserver:/media/data/www$ groups usr2 usr2 : grp1 ... usr2@kmserver:/media/data$ ls -l total 20 drwx------ 2 root root 16384 2011-05-12 10:53 lost+found drwxrwxr-x 2 grp1   grp1    4096 2011-05-12 15:15 www   Whats wrong?
16543
I'm currently trying to write a script that displays each group and user in the domain.          Import-Module ActiveDirectory  $Groups = (Get-AdGroup -filter * | Where {$_.name -like "**"} | select name -expandproperty name)  $Table = @()  $Record = [ordered]@{ "Group Name" = ""; "Name" = ""; "Username" = ""; }  Foreach ($Group in $Groups) {  $Arrayofmembers = Get-ADGroupMember -identity $Group | select name,samaccountname  foreach ($Member in $Arrayofmembers) {  $Record.Set_Item("Group Name", $Group)  $Record.Set_Item("Name", $Member.name)  $Record.Set_Item("Username", $Member.samaccountname)  $objRecord = New-Object PSObject -property $Record $Table += $objrecord  }  }  $Table | export-csv "C:\temp\SecurityGroups.csv" -NoTypeInformation   It always returns these errors:  New-Object : A positional parameter cannot be found that accepts argument '+='. At C:\Users\tech\Desktop\list.ps1:17 char:14 + $objRecord = New-Object PSObject -property $Record $Table += $objrecord +              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : InvalidArgument: (:) [New-Object], ParameterBindingException     + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.NewObjectCommand  New-Object : A positional parameter cannot be found that accepts argument '+='. At C:\Users\tech\Desktop\list.ps1:17 char:14 + $objRecord = New-Object PSObject -property $Record $Table += $objrecord +              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     + CategoryInfo          : InvalidArgument: (:) [New-Object], ParameterBindingException     + FullyQualifiedErrorId : PositionalParameterNotFound,Microsoft.PowerShell.Commands.NewObjectCommand   Repeating over and over.  Any help would be greatly appreciated!  BTW This is server 2012 R2
80206
I have the following system:  $ lsb_release -a Distributor ID: Ubuntu Description:    Ubuntu 17.10 Release:        17.10 Codename:       artful  $ gdm3 --version GDM 3.26.1   I would like to disable the user list in GDM and enter my user name and password to log-in. I have already searched a lot but did not find any valuable solution.  How can I achieve this?
99796
What i did?   [root@mdfdevha1 ~]# Group_ID=`/opt/keycloak/bin/kcadm.sh get groups -r TEST`  [root@mdfdevha1 ~]# echo $Group_ID [ { "id" : "57c86153-11ba-4d19-aafb-9903ee00086b", "name" : "Admin_UserGroup", "path" : "/Admin_UserGroup", "subGroups" : [ ] } ] [root@mdfdevha1 ~]# SURE_USER_ID=`echo $Group_ID | cut -d : -f2 | awk -F\" '{print $2}'` [root@mdfdevha1 ~]# echo $SURE_USER_ID 57c86153-11ba-4d19-aafb-9903ee00086b   In this case i am able to get the id but my requirement little bit complex  I run below command   [root@mdfdevha1 ~]#  Group_ID=`/opt/keycloak/bin/kcadm.sh get groups -r My_Realm`   and then   [root@mdfdevha1 ~]# echo $Group_ID   Output was multiple record in JSON format  [ { "id" : "e27206c0-aeb6-43db-acda-c4ba43233071", "name" : "A1", "path" : "/A1", "subGroups" : [ ] },  { "id" : "89f3bd6a-33a9-4e02-9fe3-eae660c5a6cf", "name" : "Admin_UserGroup", "path" : "/Admin_UserGroup", "subGroups" : [ ] },  { "id" : "cdc2bce5-c3bb-4b88-bdaf-d87b8bb6c644", "name" : "Group104", "path" : "/Group104", "subGroups" : [ ] },  { "id" : "a0d749f2-ab6c-4c27-ad55-3357eaab9527", "name" : "Group105", "path" : "/Group105", "subGroups" : [ ] },  { "id" : "fbf99c34-d50d-408b-8d19-9713f9af3e3a", "name" : "Group106", "path" : "/Group106", "subGroups" : [ ] },  { "id" : "ebd8336f-4017-4fb1-8035-153ae1d9ba37", "name" : "Group201", "path" : "/Group201", "subGroups" : [ ] },  { "id" : "38f4aef7-caf0-4430-9e61-1ae7026e872f", "name" : "Group202", "path" : "/Group202", "subGroups" : [ ] },  { "id" : "436a0f4a-8b1b-4d7d-a014-fcec3513644e", "name" : "Group203", "path" : "/Group203", "subGroups" : [ ] },  { "id" : "41962c5f-e7e9-4748-b81f-e3f1880b78de", "name" : "Sure_Groups", "path" : "/Sure_Groups", "subGroups" : []}]   Now from the above output i want to get the ID where name = Admin_UserGroup.  How can this will achieve ?
110973
I've just installed Xubuntu 18.04 (Bionic) and facing this issue, I wanted to report this as a bug on launchpad but thought of confirming it from here first. Thing is that when I add a group to the user like below, it should take effect on the next user login, right?  sudo usermod -aG docker prahlad   This behavior used to work until 16.04 from what I remember, but today I logged out and back in several times, yet when I see my groups by running the groups command, I'm unable to see docker added to it. However, when I created a new shell, I was able to see the new group:  su prahlad -   And of course, when I rebooted my laptop completely, I was able to able to see the docker group. Can somebody confirm whether this is a new issue introduced in Bionic? Or maybe, it just happens with docker installed?
14296
I am trying to do the following on my Mac (10.6.7):  sudo chown myusername:wheel ./entries   but Unix/Mac is returning "Operation not permitted". When I ls -lash the culprit file, it looks as follows:  8 -rwxrwxrwx   1 myusername  staff   394B Apr 26 23:26 entries   I've tried sudo and sudo su; nothing works. Any ideas what's up?  I'm trying to chmod files I've copied from my old Ubuntu box. Most of the files have successfully chmod'ed recursively; just this one is stuck and I don't understand why.
79962
I tried finding this on here, but couldn't so sorry if it's a duplicate.  Say I have 2 groups and a user: group1, group2, user1 with the following structure: group1 is a member of group 2, user1 is a member of group1  Now say I have the following files with relevant permissions  file1 root:group1 660 file2 root:group2 660   Now when I log into user1, I'm able to edit file1, but not edit file2. Short of adding user1 to group2, is there any way of doing this? or is there no way?  I'm using Ubuntu btw.
20739
I'm logged into a server as user "ubuntu" and I've got files that look like this:  -rw-rw-r-- 1 www-data www-data 33150 2012-06-04 22:17 file-a.png -rw-rw-r-- 1 www-data www-data 36371 2012-06-04 22:15 file-b.png -rw-rw-r-- 1 www-data www-data 41439 2012-06-04 22:16 file-c.png   The ubuntu user is a member of the group www-data:  groups ubuntu   produces  ubuntu : ubuntu www-data   So shouldn't I be able to change other permissions since I have access to the file? I'm not an expert on the user/group stuff. So this is just perplexing me.  I'm trying to run:  chmod o-r *  I realize I can do it with sudo, easily, but I'm trying to understand why I can't modify the files without sudo.
57850
I am sharing my personal Ubuntu PC with one of my colleagues.   I created another user with a different password (he knows of course) and added it to the sudoer list.   Given that there are two sudo users in a single Ubuntu system:   Are the private files (specified by owners and permissions) of any of these users still private?  Can I modify my colleague's files via sudo command, even sudo su, or vice versa?
6700
A sample /etc/group file contains the following entries:  root:*:0: adm:!:4:logcheck antoine:x:1000:   The man pages I've read (Debian &amp; OSX) says the second field is to store a group password.  As they are rarely used, an asterisk * or a x is usually placed in it rather than leaving it blank.  The shadow man page also says that this second field should store the result of the crypt function.  And if an invalid result is stored (such as * or !) it means the password cannot be used as authentication method.  Does that hold true for the group file as well?  Why do I end up with 3 different characters in my group file all having the same meaning?  Can I safely change all to *?
26448
I'm having trouble parsing through a CSV file to add users.  I wrote a small script to add a list of 1000 users:  export IFS=","  cat users.csv | while read a b c d e f g; do useradd -d -u $a -U $d ; done   The CSV file is formatted as:  ps2946,male,Phil Harris,Recording,6508 Hollywood Blvd,Nov 16 1950,760 901 3537 mc3225,male,Mel Blanc,Radio,6385 Hollywood Blvd.,Oct 1 1983,626 647 5560 fn1029,male,Franklin Pangborn,Motion pictures,1500 Vine Street,Mar 10 1911,858 497 6108 we9602,undefined,Webb Pierce,Recording,1600 Vine Street,Sep 3 1988,559 595 6063   However upon running the script it iterates through the entire file repeating:  useradd: invalid home directory '-u'   I used export IFS to separate the words by comma and use them as the parameters for the useradd command.   I read the manual and used the value for the home directory, but I feel like my entire script is off.  Can someone please help me in properly formatting a script to add users from a CSV file?  For reference I used this thread as a base:
50320
What can I type at my shell (which happens to be bash) that will list all the commands that are recognized?  Also, does this differ by shell? Or do all shells just have a "directory" of commands they recognize?  Secondly, different question, but how can I override any of those? In other words how can I write my own view command to replace the one existing on my Ubuntu system, which appears to just load vim.
123105
The macOS gui, as shown in the attached image, provides a way to add users and user groups to the permissions of a file system directory.  There are also lots of examples of how to create groups from the command line, etc (dscl, and so forth).  But I don't see anything on how - from the command line - to add user groups to the permissions of a file system directory.    PS: The answers in  covers network shares, but don't show how to do what the Finder does (on an unshared folder).
106732
If I type groups I get a list a back, $&gt; groups ecarroll cdrom floppy audio dip video plugdev netdev bluetooth docker  How can I find out if the logged in user is in a specific group?
53939
I want my shell prompt to look like a cheeseburger! 🍔🍔🍔  It would be nice if it also displayed: username, hostname, and current directory.
69998
Ref:   My Ubuntu user account name "user-3121" with type as "Administrator". There is one more account named "admin" with type as "Administrator". How can I be sure whether or not "admin" can login as me or otherwise view my files in "user-3121"?  I discussed this with the other user and we have tried to modify /etc/sudoers to protect my files:  Cmnd_Alias   SHELLS = /bin/sh,/bin/bash,/bin/ksh, /usr/bin/x11/passwd  Cmnd_Alias   SU = /usr/bin/su,/bin/su,/usr/bin/gksudo,/usr/bin/sudo,/usr/bin/su bash,/usr/bin/sudo /bin/bash,/usr/sbin/visudo  Cmnd_Alias   PASS = /usr/bin/passwd root,/bin/* * root,/bin/* * sysadmin,/bin/* * /home/sysadmin,/usr/bin/passwd  Cmnd_Alias      EDIT= /bin/* /etc/sudoers,/bin/* sudoers,/bin/* /etc/passwd,/bin/* passwd,/bin/* /etc/group,/bin/* group,/bin/* /etc/shadow,/bin/* shadow,/*/*/[a-z]* /etc/sudoers,/*/*/[a-z]* /etc/passwd,/*/*/[a-z]* /etc/group,/*/*/[a-z]* /etc/shadow,/*/*/[a-z]* sudoers,/*/*/[a-z]* passwd,/*/*/[a-z]* group,/*/*/[a-z]* shadow  Cmnd_Alias   CMDS = /usr/sbin/userdel * sysadmin,/usr/sbin/userdel sysadmin,/usr/sbin/deluser * sysadmin,/usr/sbin/deluser sysadmin  root    ALL=(ALL) ALL, !CMDS  %admin ALL=(ALL) ALL, !SHELLS, !SU, !CMDS, !PASS, !EDIT %sudo  ALL=(ALL) ALL,!SHELLS, !SU, !CMDS, !PASS, !EDIT  admin ALL=(ALL) ALL administrator ALL=(ALL) ALL   If "admin" can still read my data, how do I prevent that?  Also how does this configuration work, it allows "user-3121" to run some sudo commands, but it doesn't actually mention "user-3121" anywhere?  P.S. I'm the only person who knows the password for the "root" user, so that I can log in as root using the "su" command.