在AWS服务器上授予net_privaddr特权


0

在AWS Server上,我需要向用户授予“ net_privaddr”特权。我尝试使用以下命令:

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

但是在AWS服务器上,K选项不存在。看:

[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]#

因此,当Usermod没有“ K”选项时,如何授予该特权?

TIA,

PS。这是我的linux版本

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 

听起来您正在尝试将Solaris或BSD概念应用于Linux。您可能应该编辑此问题,以询问如何解决您遇到的实际问题,而不是如何解决可能未解决的根本问题(您没有提到)。
Michael-sqlbot

谢谢迈克尔。我没有提到让问题变得更简单的理由,但是您是对的。我将在几分钟后编辑我的问题。
Mario S
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.