forked from offensive-security/kali-cloud-build
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
12 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
* Plugin removed: "ec2-run-user-data" is back in the standard bootstrapping process and has been simplified | ||
|
||
#### Minor changes: #### | ||
* Plugin modified: "ec2-user" renamed to "admin-user". Login name is now "admin" | ||
|
||
### 2012-11-06 Anders Ingemann <[email protected]> ### | ||
|
||
|
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
insert_task_after $TASK_PACKAGES \ | ||
$plugindir/admin-user-tasks/add-sudo-package | ||
insert_task_after $TASK_INITSCRIPTS \ | ||
$plugindir/admin-user-tasks/create-user |
File renamed without changes.
8 changes: 4 additions & 4 deletions
8
plugins/ec2-user-tasks/create-user → plugins/admin-user-tasks/create-user
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
#!/bin/bash | ||
ec2user_name='ec2-user' | ||
admin_username='admin' | ||
|
||
# Create the user and add him to the 'sudo' group | ||
chroot $imagedir useradd --create-home --shell /bin/bash $ec2user_name | ||
chroot $imagedir useradd --create-home --shell /bin/bash $admin_username | ||
|
||
# Allow ec2-user to use sudo without a password | ||
sed -i "/^root\tALL=(ALL) ALL/a ec2-user\tALL=(ALL) NOPASSWD: ALL" $imagedir/etc/sudoers | ||
sed -i "/^root\tALL=(ALL) ALL/a $admin_username\tALL=(ALL) NOPASSWD: ALL" $imagedir/etc/sudoers | ||
|
||
# ec2-get-credentials should add the pubkey to the new user account and not root | ||
sed -i "s/^username='root'/username='$ec2user_name'/" $imagedir/etc/init.d/ec2-get-credentials | ||
sed -i "s/^username='root'/username='$admin_username'/" $imagedir/etc/init.d/ec2-get-credentials | ||
|
||
# Disallow root login | ||
sed -i "s/^PermitRootLogin yes/PermitRootLogin no/" $imagedir/etc/ssh/sshd_config |
This file was deleted.
Oops, something went wrong.