Skip to contentSkip to conversation

change root home dir to /root

PATCH Applied Dave Young 2 participants 2 messages Dec 26, 2011 – Jan 23, 2012 1 message not in the archive

lore
Share & tools
lore

Dave Young

author
#0 lore raw

PATCH v2 3/5 change root home dir to /root

ssh need to read knownhosts from home directory, so change root home to /root

---
 modules.d/99base/module-setup.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
modules.d/99base/module-setup.sh +1 -1
index 03058b1..fad6c50 100755
@@ -23,7 +23,7 @@ install() {
     fi
 
     #add common users in /etc/passwd, it will be used by nfs/ssh currently
-    egrep '^root:' "$initdir/etc/passwd" 2>/dev/null || echo  'root:x:0:0::/:/bin/sh' >> "$initdir/etc/passwd"
+    egrep '^root:' "$initdir/etc/passwd" 2>/dev/null || echo  'root:x:0:0::/root:/bin/sh' >> "$initdir/etc/passwd"
     egrep '^nobody:' /etc/passwd >> "$initdir/etc/passwd"
     # install our scripts and hooks
     inst "$moddir/init" "/init"
Signature · 1 line
1.7.1
#2 lore raw
In reply to a message not in the archive

Am 26.12.2011 07:29, schrieb Dave Young:

Quoted 12 lines

ssh need to read knownhosts from home directory, so change root home to /root

---
 modules.d/99base/module-setup.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
modules.d/99base/module-setup.sh +0 -0
index 03058b1..fad6c50 100755

modules.d/99base/module-setup.sh install() { · line 29

Quoted 8 lines
modules.d/99base/module-setup.sh +1 -1
@@ -23,7 +23,7 @@ install() {
     fi
 
     #add common users in /etc/passwd, it will be used by nfs/ssh currently
-    egrep '^root:' "$initdir/etc/passwd" 2>/dev/null || echo  'root:x:0:0::/:/bin/sh' >> "$initdir/etc/passwd"
+    egrep '^root:' "$initdir/etc/passwd" 2>/dev/null || echo  'root:x:0:0::/root:/bin/sh' >> "$initdir/etc/passwd"
     egrep '^nobody:' /etc/passwd >> "$initdir/etc/passwd"
     # install our scripts and hooks
     inst "$moddir/init" "/init"

pushed