more robust defaults, notably for Ubuntu 24.04;
authorwenzelm
Sat, 04 Jan 2025 23:14:10 +0100
changeset 81723 b5d329f7fe95
parent 81720 12ecf11f8eab
child 81724 ed5a05b06ee0
more robust defaults, notably for Ubuntu 24.04;
src/Pure/System/linux.scala
src/Pure/Tools/phabricator.scala
--- a/src/Pure/System/linux.scala	Sat Jan 04 21:33:08 2025 +0100
+++ b/src/Pure/System/linux.scala	Sat Jan 04 23:14:10 2025 +0100
@@ -97,9 +97,12 @@
 
     Isabelle_System.bash(
       "adduser --quiet --disabled-password --gecos " + Bash.string(description) +
+        " --home /home/" + Bash.string(name) +
         (if (system) " --system --group --shell /bin/bash " else "") +
         " " + Bash.string(name)).check
 
+    Isabelle_System.bash("usermod -p '*' " + Bash.string(name)).check
+
     if (ssh_setup) {
       val id_rsa = user_home(name) + "/.ssh/id_rsa"
       Isabelle_System.bash("""
--- a/src/Pure/Tools/phabricator.scala	Sat Jan 04 21:33:08 2025 +0100
+++ b/src/Pure/Tools/phabricator.scala	Sat Jan 04 23:14:10 2025 +0100
@@ -777,6 +777,9 @@
 
   /** setup ssh **/
 
+  // see also https://we.phorge.it/book/phorge/article/diffusion_hosting/#sshd-setup
+
+
   /* sshd config */
 
   private val Port = """^\s*Port\s+(\d+)\s*$""".r