ONTAP Mediator add fails due to lack of sudo privilege for netapp user
Applies to
- ONTAP 9
- MetroCluster IP
- ONTAP Mediator
Issue
- Adding mediator to metrocluster fails with the following error:
cluster1::> metrocluster configuration-settings mediator add -mediator-address 172.xx.xx.64
Adding the mediator and enabling Automatic Unplanned Switchover. It may take a few minutes to complete.
Please enter the username for the mediator: mediatoradmin
Please enter the password for the mediator:
Confirm the mediator password:
Creating mediator mailboxes...
Error: command failed: The request to reach the mediator failed during the add operation.
Check if the mediator is reachable and then try the operation again.
- From the mediator host, the "ontap_mediator" service status shows an error:
[root@unixuser ~]# systemctl status ontap_mediator.service
● ontap_mediator.service - ONTAP Mediator
Loaded: loaded (/etc/systemd/system/ontap_mediator.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2022-06-29 16:04:13 +08; 1 weeks 0 days ago
Main PID: 1384 (uwsgi)
Status: "uWSGI is ready"
Tasks: 3 (limit: 49341)
Memory: 148.7M
CGroup: /system.slice/ontap_mediator.service
├─1384 /opt/netapp/lib/ontap_mediator/pyenv/bin/uwsgi --ini /opt/netapp/lib/ontap_mediator/uwsgi/ontap_mediator.ini
├─3332 /opt/netapp/lib/ontap_mediator/pyenv/bin/uwsgi --ini /opt/netapp/lib/ontap_mediator/uwsgi/ontap_mediator.ini
└─3334 /opt/netapp/lib/ontap_mediator/pyenv/bin/uwsgi --ini /opt/netapp/lib/ontap_mediator/uwsgi/ontap_mediator.ini
Jun 29 16:04:11 unixuser.domain.com systemd[1]: Starting ONTAP Mediator...
Jun 29 16:04:11 unixuser.domain.com ontap_mediator[1384]: [uWSGI] getting INI configuration from /opt/netapp/lib/ontap_mediator/uwsgi/ontap_mediator.ini
Jun 29 16:04:13 unixuser.domain.com systemd[1]: Started ONTAP Mediator.
Jun 29 16:06:44 unixuser.domain.com sudo[4511]: pam_access(sudo:account): access denied for user `netapp' from `'
Jun 29 16:06:44 unixuser.domain.com sudo[4511]: netapp : PAM account management error: Permission denied ; TTY=unknown ; PWD=/opt/netapp/lib/ontap_mediator ; USER=root ; COMMAN>