mirror of
https://github.com/darksaid98/ubuntu-server-setup.git
synced 2026-12-01 22:22:31 +00:00
Enables one to run setup without creating a new user by using a second non-root account (#15)
* Enable one to choose to use an existing second non-root account for configuring the server. * Current user by def * Changed default TimeZone and added a more secure ssh key derivation method according to https://blog.peterruppel.de/ed25519-for-ssh/ * Refactor setup scripts Co-authored-by: BreakSecurity <[email protected]>
This commit is contained in:
1 parent
8c4f801e10
commit
7beaeed0cd
3 files changed
+29
-8
No files matched your search
+11
-1
@@ -1,5 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Update the user account
|
||||
# Arguments:
|
||||
# Account Username
|
||||
function updateUserAccount() {
|
||||
local username=${1}
|
||||
|
||||
sudo passwd -d "${username}"
|
||||
sudo usermod -aG sudo "${username}"
|
||||
}
|
||||
|
||||
# Add the new user account
|
||||
# Arguments:
|
||||
# Account Username
|
||||
@@ -154,4 +164,4 @@ function disableSudoPassword() {
|
||||
function revertSudoers() {
|
||||
sudo cp /etc/sudoers.bak /etc/sudoers
|
||||
sudo rm -rf /etc/sudoers.bak
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user