save_mysql_passwd.sh needs to add a check so that it could be run only as the appdynamics user

Open Beginner friendly
#88 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
shell
Domain
security

Research direction

Start with save_mysql_passwd.sh and inspect how it reads the user specified in db.cnf. Verify the script's behavior when run as root and as the configured appdynamics user; it is done when unauthorized execution is rejected and the configured user can still create the MySQL login file.

Written by the indexing model from the issue text.

Description

For MySQL 5.7, save_mysql_passwd.sh creates .mylogin.cnf and the permissions on this file are 600.
So this script needs to be run as the user that is specified in db.cnf.

Many customers are running this as root, and as appd user cannot read the .mylogin.cnf the logins fail.
This file cannot be made world readable as MySQL would not accept login file that is world readable.

Dominant language
Shell
Stars
13
Forks
11
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Appdynamics/HA-toolkit

All issues in Appdynamics/HA-toolkit

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.