From 33e419ff5b7d11fe91763713be7913cde43ae9ed Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Thu, 19 Sep 2024 17:21:59 +0200 Subject: [PATCH] Update new-user.ps1 --- scripts/new-user.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/new-user.ps1 b/scripts/new-user.ps1 index db08f8c8..849bf4a7 100755 --- a/scripts/new-user.ps1 +++ b/scripts/new-user.ps1 @@ -5,7 +5,7 @@ This PowerShell script creates a new user account with an encrypted home directory. .EXAMPLE PS> ./new-user.ps1 Joe - ✔️ Created new user 'Joe' with encrypted home directory in 11s. + ✔️ Created user account 'Joe' with encrypted home directory in 11s. .LINK https://github.com/fleschutz/PowerShell .NOTES @@ -19,13 +19,14 @@ try { $stopWatch = [system.diagnostics.stopwatch]::startNew() if ($IsLinux) { + & sudo apt install ecryptfs-utils & sudo adduser --encrypt-home $username } else { throw "Not supported yet" } [int]$elapsed = $stopWatch.Elapsed.TotalSeconds - "✔️ Created new user '$username' with encrypted home directory in $($elapsed)s." + "✔️ Created user account '$username' with encrypted home directory in $($elapsed)s." exit 0 # success } catch { "⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"