-
-
Save res0nat0r/1d4a38b7bdcbf6f26f0b to your computer and use it in GitHub Desktop.
Revisions
-
Stefhen Hovland revised this gist
Oct 7, 2015 . 1 changed file with 10 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,10 @@ #!/bin/bash # USAGE: ./delete-console-user.sh $GROUPNAME $USERNAME aws iam delete-login-profile --user-name $2 aws iam detach-user-policy --user-name $2 --policy-arn 'arn:aws:iam::aws:policy/AdministratorAccess' aws iam remove-user-from-group --user-name $2 --group-name $1 aws iam delete-user --user-name $2 aws iam detach-group-policy --group-name $1 --policy-arn 'arn:aws:iam::aws:policy/AdministratorAccess' aws iam delete-group --group-name $1 -
Stefhen Hovland revised this gist
Oct 7, 2015 . 1 changed file with 7 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,18 +7,18 @@ # Create administrator group aws iam create-group --group-name $1 aws iam attach-group-policy --group-name $1 --policy-arn 'arn:aws:iam::aws:policy/AdministratorAccess' # Create user and attach to AdministratorAccess policy aws iam create-user --user-name $2 aws iam create-login-profile --user-name $2 --password $3 aws iam add-user-to-group --group-name $1 --user-name $2 aws iam attach-user-policy --user-name $2 --policy-arn 'arn:aws:iam::aws:policy/AdministratorAccess' # Grab account ID ID=$(aws iam list-users --out text | head -1 | cut -f2 | awk -F'::' '{print $2}' | cut -f1 -d:) echo echo SIGNIN URL: -
Stefhen Hovland revised this gist
Oct 6, 2015 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,19 +7,19 @@ # Create administrator group aws --profile fd-dd-prod iam create-group --group-name $1 aws --profile fd-dd-prod iam attach-group-policy --group-name $1 --policy-arn 'arn:aws:iam::aws:policy/AdministratorAccess' # Create user and attach to AdministratorAccess policy aws --profile fd-dd-prod iam create-user --user-name $2 aws --profile fd-dd-prod iam create-login-profile --user-name $2 --password $3 aws --profile fd-dd-prod iam add-user-to-group --group-name $1 --user-name $2 aws --profile fd-dd-prod iam attach-user-policy --user-name $2 --policy-arn 'arn:aws:iam::aws:policy/AdministratorAccess' # Grab account ID ID=$(aws --profile fd-dd-prod iam list-users --out text | head -1 | cut -f2 | awk -F'::' '{print $2}' | cut -f1 -d:) echo echo SIGNIN URL: echo "https://$ID.signin.aws.amazon.com/console/" -
Stefhen Hovland revised this gist
Oct 6, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,7 +18,7 @@ aws iam add-user-to-group --group-name $1 --user-name $2 aws iam attach-user-policy --user-name $2 --policy-arn 'arn:aws:iam::aws:policy/AdministratorAccess' # Grab account ID ID=$(aws iam list-users --out text | head -1 | cut -f2 | awk -F'::' '{print $2}' | cut -f1 -d:) echo SIGNIN URL: echo -
Stefhen Hovland revised this gist
Oct 6, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ #!/bin/bash # USAGE: ./create-aws-console-user.sh $GROUPNAME $USERNAME $PASSWORD # http://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html#id_users_create_cliwpsapi -
Stefhen Hovland renamed this gist
Oct 6, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Stefhen Hovland revised this gist
Oct 6, 2015 . 1 changed file with 6 additions and 16 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,25 +7,15 @@ # Create administrator group aws iam create-group --group-name $1 aws iam attach-group-policy --group-name $1 --policy-arn 'arn:aws:iam::aws:policy/AdministratorAccess' # Create user and attach to AdministratorAccess policy aws iam create-user --user-name $2 aws iam create-login-profile --user-name $2 --password $3 aws iam add-user-to-group --group-name $1 --user-name $2 aws iam attach-user-policy --user-name $2 --policy-arn 'arn:aws:iam::aws:policy/AdministratorAccess' # Grab account ID ID=$(aws iam list-users | head -1 | cut -f2 | awk -F'::' '{print $2}' | cut -f1 -d:) -
Stefhen Hovland revised this gist
Oct 6, 2015 . 1 changed file with 30 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,35 @@ #!/bin/bash # USAGE: ./create-user.sh $GROUPNAME $USERNAME $PASSWORD # http://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html#id_users_create_cliwpsapi # Create administrator group echo aws iam create-group --group-name $0 aws iam create-group --group-name $0 echo aws iam attach-group-policy --group-name $0 --policy-arn 'arn:aws:iam::aws:policy/AdministratorAccess' aws iam attach-group-policy --group-name $0 --policy-arn 'arn:aws:iam::aws:policy/AdministratorAccess' # Create user and attach to AdministratorAccess policy echo aws iam create-user --user-name $1 aws iam create-user --user-name $1 echo aws iam create-login-profile --user-name $1 --password $2 aws iam create-login-profile --user-name $1 --password $2 echo aws iam add-user-to-group --group-name $0 --user-name $1 aws iam add-user-to-group --group-name $0 --user-name $1 echo aws iam attach-user-policy --user-name $1 --policy-arn 'arn:aws:iam::aws:policy/AdministratorAccess' aws iam attach-user-policy --user-name $1 --policy-arn 'arn:aws:iam::aws:policy/AdministratorAccess' # Grab account ID ID=$(aws iam list-users | head -1 | cut -f2 | awk -F'::' '{print $2}' | cut -f1 -d:) echo SIGNIN URL: echo echo "https://$ID.signin.aws.amazon.com/console/" -
Stefhen Hovland revised this gist
Oct 6, 2015 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,4 +2,6 @@ # http://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html#id_users_create_cliwpsapi workon awscli aws iam create-group --group-name admins -
Stefhen Hovland created this gist
Oct 6, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ #!/bin/bash # http://docs.aws.amazon.com/IAM/latest/UserGuide/id_users_create.html#id_users_create_cliwpsapi aws iam create-user $0