How to add to group when name has a space?
Group and user names aren’t allowed to contain the space character on POSIX-style systems; see Command line login failed with two strings ID in Debian Stretch for references (the restrictions apply to groups as well as users).
In your case you might be able to work around the limitation by managing your groups in AD rather than in /etc/group
. But I’d recommend trying to convince the powers that be to drop spaces entirely...
I had a similar problem with group name "domain users" coming from AD. For chown
I was able to use group id number instead of group name. For example:
sudo chown -R user1:118600513 /home/user1
where 118600513 is the id for a group "domain users".