Grant net_privaddr privileges on a AWS server

0

On a AWS Server, I need to grant the "net_privaddr" privilege to an user. I tried with this command:

/usr/sbin/usermod -K defaultpriv=basic,net_privaddr USER

But on the AWS server, the K option does not exists. Look:

[root@xxxx dddd]# /usr/sbin/usermod -K defaultpriv=basic,net_privaddr USER
/usr/sbin/usermod: invalid option -- 'K'
Usage: usermod [options] LOGIN

Options:
  -c, --comment COMMENT         new value of the GECOS field
  -d, --home HOME_DIR           new home directory for the user account
  -e, --expiredate EXPIRE_DATE  set account expiration date to EXPIRE_DATE
  -f, --inactive INACTIVE       set password inactive after expiration
                                to INACTIVE
  -g, --gid GROUP               force use GROUP as new primary group
  -G, --groups GROUPS           new list of supplementary GROUPS
  -a, --append                  append the user to the supplemental GROUPS
                                mentioned by the -G option without removing
                                him/her from other groups
  -h, --help                    display this help message and exit
  -l, --login NEW_LOGIN         new value of the login name
  -L, --lock                    lock the user account
  -m, --move-home               move contents of the home directory to the
                                new location (use only with -d)
  -o, --non-unique              allow using duplicate (non-unique) UID
  -p, --password PASSWORD       use encrypted password for the new password
  -s, --shell SHELL             new login shell for the user account
  -u, --uid UID                 new UID for the user account
  -U, --unlock                  unlock the user account
  -Z, --selinux-user            new SELinux user mapping for the user account

[root@xxxx dddd]#

So, how can I grant that privilege when Usermod does not have the "K" option?

TIA,

PS. This is my linux version

Linux version 3.10.48-55.140.amzn1.x86_64 (mockbuild@gobi-build-60002) 
(gcc version 4.8.2 20131212 (Red Hat 4.8.2-7) (GCC) ) #1 SMP 

Mario S

Posted 2014-07-19T14:50:26.323

Reputation: 117

It sounds like you are trying to apply Solaris or BSD concepts to Linux. You should probably edit this question to ask how to solve the actual problem you are having, rather than how to do what is probably not the thing that needs to be done in order to solve the underlying problem, which you haven't mentioned. – Michael - sqlbot – 2014-07-19T19:19:19.667

Thank you Michael. I didn't mention the undelying for make the question simpler, but you're right. I will edit my question on a few minutes. – Mario S – 2014-07-22T00:29:14.993

No answers