Add a local user to an AD group in Linux

6,791

Answer was pretty simple, indeed. I can do usermod -g ad-group local-user

Share:
6,791

Related videos on Youtube

Eduardo Costa
Author by

Eduardo Costa

Just another Java/PHP/Perl/C#/Objective-C/C/C++/Bash programmer...

Updated on September 18, 2022

Comments

  • Eduardo Costa
    Eduardo Costa almost 2 years

    I have a bunch of batch applications that must run with a local linux user "batchjobs". Our team have AD users (eg: "COMPANY/user") to login to that machine. If we need to change current production state (editing a "batchjobs" script, reading log files, etc), we "sudo su" to that user. I want to find an easier way, specially because the old "root does all" structure worked a lot better (weird, but true).

    I'm trying these approaches:

    1. Manually adding all users to "batchjobs". Works, but it's darn ugly, because there are N servers and M users, and both variables are really "variable"; or
    2. Map the "batchjobs" local group to "my-team" AD group. This seems to be the best solution, because with newgrp and umask on .bashrc, the team will work with "batchjobs" files without worrying about sudo or chown/chgrp. I don't know if it's possible. I tried with "net groupmap add" without success.

    Currently, the only constraint I have is I cannot create AD users or groups. All team members are members of "my-team" AD group.

    • James T Snell
      James T Snell almost 13 years
      I guess you can't just make an appropriate user in AD itself? AD on Linux is always fun.