Author:
erics , March 16th, 2022
Had an old server, needed to get root.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
service mysql stop
~ OR ~
service mysqld stop
cd / etc / init . d ;
. / mysql < tab > start -- skip - grant - tables
mysql > update mysql . user set Password = PASSWORD ( 'secret' ) where user = 'root' ;
mysql > flush privileges ;
mysql > ^ D
service mysql stop
service mysql start
~ OR ~
service mysqld stop
service mysqld start
For MySQL 5.7: https://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html For some other v5.7 nodes, I had admin access via a different user’s login, so all I needed was this:
ALTER USER 'root' @ 'localhost' IDENTIFIED BY 'secret' ;
ALTER USER 'root' @ '%' IDENTIFIED BY 'secret' ;
Categories: How-To's , Technology Tags: 5.5 , Flush , Grant , init.d , Lost , mysql , MySQL 5.5 , Password , privileges , recover , Recovery , Reset , root , service , Skip , skip-grant-tables , Tables , User
| No comments
Author:
erics , July 29th, 2021
SUMMARY: Needed to create an AWS IAM Policy to allow a user access to create and delete EBS snapshots. This script also needed to be able to list volumes:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
{
"Version" : "2012-10-17" ,
"Statement" : [
{
"Sid" : "VisualEditor0" ,
"Effect" : "Allow" ,
"Action" : [
"ec2:DeleteSnapshot" ,
"ec2:ModifySnapshotAttribute" ,
"ec2:CreateSnapshots" ,
"ec2:ResetSnapshotAttribute" ,
"ec2:CreateSnapshot"
] ,
"Resource" : [
"arn:aws:ec2:*:ACCOUNT_ID_HERE:volume/*" ,
"arn:aws:ec2:*:ACCOUNT_ID_HERE:snapshot/*" ,
"arn:aws:ec2:*:ACCOUNT_ID_HERE:instance/*"
]
} ,
{
"Sid" : "VisualEditor1" ,
"Effect" : "Allow" ,
"Action" : [
"ec2:DescribeSnapshotAttribute" ,
"ec2:DescribeVolumes" ,
"ec2:DescribeSnapshots"
] ,
"Resource" : "*"
}
]
}
Categories: How-To's , Technology Tags: Amazon , AWS , Create , Delete , howto , IAM , JSON , Policy , Snapshot , tips , User , volume
| No comments
Author:
erics , July 28th, 2021
SUMMARY: Needed to create an AWS IAM Policy to allow a user access to two buckets and their associated CDN’s in WordPress W3 Total Cache
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
{
"Version" : "2012-10-17" ,
"Statement" : [
{
"Sid" : "VisualEditor0" ,
"Effect" : "Allow" ,
"Action" : "s3:ListBucket" ,
"Resource" : "arn:aws:s3:::wyzaerd-demo-prod"
} ,
{
"Sid" : "VisualEditor1" ,
"Effect" : "Allow" ,
"Action" : [
"s3:PutObject" ,
"s3:GetObject" ,
"s3:DeleteObject" ,
"s3:PutObjectAcl"
] ,
"Resource" : "arn:aws:s3:::wyzaerd-demo-prod/*"
} ,
{
"Sid" : "VisualEditor2" ,
"Effect" : "Allow" ,
"Action" : "s3:ListBucket" ,
"Resource" : "arn:aws:s3:::wyzaerd-demo-dev"
} ,
{
"Sid" : "VisualEditor3" ,
"Effect" : "Allow" ,
"Action" : [
"s3:PutObject" ,
"s3:GetObject" ,
"s3:DeleteObject" ,
"s3:PutObjectAcl"
] ,
"Resource" : "arn:aws:s3:::wyzaerd-demo-dev/*"
} ,
{
"Sid" : "VisualEditor4" ,
"Effect" : "Allow" ,
"Action" : [
"s3:ListAllMyBuckets" ,
"cloudfront:ListDistributions"
] ,
"Resource" : "*"
}
]
}
Categories: How-To's , Technology Tags: Amazon , AWS , Bucket , CDN , CloudFront , howto , IAM , JSON , Policy , S3 , tips , User , W3 Total Cache
| No comments
Author:
erics , May 11th, 2020
add_filter ( 'user_meta_admin_email_recipient' , 'changeAdminEmails' ) ;
function changeAdminEmails ( $ emails ) {
return array ( 'youremailtarget1@yourdomain.com' , 'youremailtarget2@yourdomain.com' ) ;
}
Categories: How-To's , Technology Tags: admin , Admin Email , Change , Destination , Edit , Email , howto , meta , modify , Notification , Pro , Target , tips , User , user-meta , user-meta-pro , WordPress , WP , WP User Meta
| No comments