Context
On newer versions of
asadm, certain commands require you to escalate your privileges up to
enable level before they can be run. If doing this from within
asadm, you simply type
enable and you can then run the required command, but if you run it from the command line you will not get the opportunity to escalate privileges to
enable mode, resulting in the following error:
$ asadm -e "asinfo -v 'set-config:context=namespace;id=test;enable-benchmarks-read=true'"
Seed: [('127.0.0.1', 3000, None)]
Config_file: /root/.aerospike/astools.conf, /etc/aerospike/astools.conf
ERROR: User must be in privileged mode to issue "asinfo" commands.
Type "enable" to enter privileged mode.
Method
You can switch to
enable mode from the command line by prepending your
asinfo command with
enable:
$ asadm -e "enable;asinfo -v 'set-config:context=namespace;id=test;enable-benchmarks-read=true'"
Seed: [('127.0.0.1', 3000, None)]
Config_file: /root/.aerospike/astools.conf, /etc/aerospike/astools.conf
~~~ enable ~~~
~~~ asinfo -v 'set-config:context=namespace;id=test;enable-benchmarks-read=true' ~~~
a0139619a5bb:3000 (172.17.0.3) returned:
ok
Applies To Earliest Version
4.9
Applies To Latest Version
Current Version