system backup fail to start

This support forum board is for support questions relating to Nagios Network Analyzer, our network traffic and bandwidth analysis solution.
Locked
mansonli
Posts: 60
Joined: Wed Aug 05, 2020 1:54 am

system backup fail to start

Post by mansonli »

Is the system backup unable to start (see screenshot attached) due to expired password of nna which's used to run cron job? If yes, how to change its password and ensure NNA service can be running normally?

● crond.service - Command Scheduler
Loaded: loaded (/usr/lib/systemd/system/crond.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2020-09-17 18:33:09 HKT; 2 weeks 5 days ago
Main PID: 683 (crond)
Memory: 768.0K
CGroup: /system.slice/crond.service
└─683 /usr/sbin/crond -n

Oct 07 11:26:01 AZALVGISNGOAP11 crond[12727]: pam_unix(crond:account): expired password for user nna (password aged)
Oct 07 11:26:01 AZALVGISNGOAP11 crond[12727]: (nna) PAM ERROR (Authentication token is no longer valid; new one required)
Oct 07 11:27:01 AZALVGISNGOAP11 crond[12948]: pam_unix(crond:account): expired password for user nna (password aged)
Oct 07 11:27:01 AZALVGISNGOAP11 crond[12948]: (nna) PAM ERROR (Authentication token is no longer valid; new one required)
Oct 07 11:28:01 AZALVGISNGOAP11 crond[13129]: pam_unix(crond:account): expired password for user nna (password aged)
Oct 07 11:28:01 AZALVGISNGOAP11 crond[13129]: (nna) PAM ERROR (Authentication token is no longer valid; new one required)
Oct 07 11:29:01 AZALVGISNGOAP11 crond[13308]: pam_unix(crond:account): expired password for user nna (password aged)
Oct 07 11:29:01 AZALVGISNGOAP11 crond[13308]: (nna) PAM ERROR (Authentication token is no longer valid; new one required)
Oct 07 11:30:01 AZALVGISNGOAP11 crond[13548]: pam_unix(crond:account): expired password for user nna (password aged)
Oct 07 11:30:01 AZALVGISNGOAP11 crond[13548]: (nna) PAM ERROR (Authentication token is no longer valid; new one required)
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: system backup fail to start

Post by tgriep »

Login as root to the NNA serevr and run the following to remove the password and set it to not expire.

Code: Select all

passwd --delete nna
chage -I -1 -m 0 -M 99999 -E -1 nna
The next time the cron job runs, it should be able to run what is needed as the nna user.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mansonli
Posts: 60
Joined: Wed Aug 05, 2020 1:54 am

Re: system backup fail to start

Post by mansonli »

However, user naa doesn't exist in /etc/passwd. Why there's error when running cron job as this user? As such, how to fix backup error?
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: system backup fail to start

Post by tgriep »

The error is for the nna user, not for a user called naa.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mansonli
Posts: 60
Joined: Wed Aug 05, 2020 1:54 am

Re: system backup fail to start

Post by mansonli »

If nna's password is removed, will this impact service run as this user not able to run normally?
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: system backup fail to start

Post by tgriep »

Yes, removing the password will fix the cron job that is failing and allow it to run.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mansonli
Posts: 60
Joined: Wed Aug 05, 2020 1:54 am

Re: system backup fail to start

Post by mansonli »

Where's the system backup stored? Is it possible to change its default path?
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: system backup fail to start

Post by tgriep »

The backups are stored in /store/backups/nagiosna by default.

To change the path where the backups are stored, you would have to edit this script.

Code: Select all

/usr/local/nagiosna/scripts/backup_na.sh
Change the rootdir option to the path you want.

Code: Select all

if [ -z $rootdir ]; then
    rootdir="/store/backups/nagiosna"
fi
The path you use has to be writable by the nna user and the nnacmd group.

You will also have to edit this file

Code: Select all

/var/www/html/nagiosna/application/controllers/admin.php
and change the path /store/backups/nagiosna to the new location so the Web interface will look there for the backup files and display them in the GUI.
Be sure to check out our Knowledgebase for helpful articles and solutions!
mansonli
Posts: 60
Joined: Wed Aug 05, 2020 1:54 am

Re: system backup fail to start

Post by mansonli »

which proceeses and services does nna use for? Will password removal of this user cause service outage or interruption?
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: system backup fail to start

Post by tgriep »

Cron jobs, the nfcapd daemon that captures the data use the nna account to run and removing the password will not cause service outage or interruptions.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked