[ARVADOS] updated: 2.2.1-11-ge2a545877

Git user git at public.arvados.org
Wed Jul 28 15:12:47 UTC 2021


Summary of changes:
 services/login-sync/bin/arvados-login-sync | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

       via  e2a5458774e462d5f6250ba9c48913608af4ba07 (commit)
      from  6cd9026e653c2b4845f1d8c258a755cc5003b833 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit e2a5458774e462d5f6250ba9c48913608af4ba07
Author: Ward Vandewege <ward at curii.com>
Date:   Tue Jul 27 14:40:19 2021 -0400

    17903: use more distribution-agnostic commands to add/remove a user
           to/from a group. This makes arvados-login-sync work on CentOS as
           well as Debian-based distributions.
    
    Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at curii.com>

diff --git a/services/login-sync/bin/arvados-login-sync b/services/login-sync/bin/arvados-login-sync
index d8836f19b..8e5c6deb5 100755
--- a/services/login-sync/bin/arvados-login-sync
+++ b/services/login-sync/bin/arvados-login-sync
@@ -144,7 +144,7 @@ begin
       if existing_groups.index(addgroup).nil?
         # User should be in group, but isn't, so add them.
         STDERR.puts "Add user #{username} to #{addgroup} group"
-        system("adduser", username, addgroup)
+        system("usermod", "-aG", addgroup, username)
       end
     end
 
@@ -152,7 +152,7 @@ begin
       if groups.index(removegroup).nil?
         # User is in a group, but shouldn't be, so remove them.
         STDERR.puts "Remove user #{username} from #{removegroup} group"
-        system("deluser", username, removegroup)
+        system("gpasswd", "-d", username, removegroup)
       end
     end
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list