Permalink
Browse files

Extracted the etc/passwd and etc/shadow files from the ssh-setup-file…

…s.tar.gz gzipped tarfile and added these files to the Razor-Microkernel project instead. Also added a third file (etc/shadow-nologin) to the project. This third file is used for production systems (where we want to disable login by any user, even at the console). Finally, made changes to the build-dependency-files.sh script to copy over the appropriate pair of files (etc/passwd and etc/shadow for development systems; etc/passwd and etc/shadow-nologin for production systems) into what will be the /etc/passwd and /etc/shadow files on the ISO we are building.
  • Loading branch information...
Tom McSweeney
Tom McSweeney committed Jun 8, 2012
1 parent e544bf1 commit 33ef2c92ceeeac19d1e429a90eee725d5132222d
Showing with 29 additions and 6 deletions.
  1. BIN additional-build-files/ssh-setup-files.tar.gz
  2. +17 −6 build-dependency-files.sh
  3. +4 −0 etc/passwd
  4. +4 −0 etc/shadow
  5. +4 −0 etc/shadow-nologin
Binary file not shown.
View
@@ -254,18 +254,29 @@ ln -s /usr/local/sbin/dmidecode tmp-build-dir/usr/sbin 2> /dev/null
# copy over a few additional dependencies (currently, this includes the
# following files:
# 1. ssh-setup-files.tar.gz -> contains the setup files needed for the
-# SSH/SSL along with the passwd and shadow files (used for development
-# access to the Microkernel); if the '--build-prod-image' flag is set,
-# then this file will be skipped
+# SSH/SSL (used for development access to the Microkernel); if
+# the '--build-prod-image' flag is set, then this file will be skipped
# 2. mcollective-setup-files.tar.gz -> contains the setup files needed for
# running the mcollective daemon
# 3. mk-open-vm-tools.tar.gz -> contains the files needed for the
# 'open_vm_tools.tcz' extension
+# 4. the etc/passwd and etc/shadow files from the Razor-Microkernel project
+# (note; if this is a production system then the etc/shadow-nologin
+# file will be copied over instead of the etc/shadow file (to block
+# access to the Microkernel from the console)
cp -p additional-build-files/*.gz tmp-build-dir/build_dir/dependencies
-# if we're building a production system, remove the SSH setup files from the
-# files we just copied over to the dependencies directory
-if [ $BUILD_DEV_ISO = 'no' ]; then
+# Copy over the etc/passwd file to the tmp-build-dir/etc directory.
+# If we're building a production system, development system, also copy over the
+# etc/shadow file to the same directory. If it's a production system we're
+# building the ISO for, then copy over the etc/shadow-nologin file instead
+# (and remove the SSH setup files from the files we just copied over to the
+# dependencies directory)
+cp -p etc/passwd tmp-build-dir/etc
+if [ $BUILD_DEV_ISO = 'yes' ]; then
+ cp -p etc/shadow tmp-build-dir/etc
+else
+ cp -p etc/shadow-nologin tmp-build-dir/etc/shadow
rm tmp-build-dir/build_dir/dependencies/ssh-setup-files.tar.gz
fi
View
@@ -0,0 +1,4 @@
+root:x:0:0:root:/root:/bin/sh
+lp:x:7:7:lp:/var/spool/lpd:/bin/sh
+nobody:x:65534:65534:nobody:/nonexistent:/bin/false
+tc:x:1001:50:Linux User,,,:/home/tc:/bin/sh
View
@@ -0,0 +1,4 @@
+root:*:13525:0:99999:7:::
+lp:*:13510:0:99999:7:::
+nobody:*:13509:0:99999:7:::
+tc:$1$iW.jV5De$AFGPiwlOqFDQ2M5XRz74u.:15492:0:99999:7:::
View
@@ -0,0 +1,4 @@
+root:*:13525:0:99999:7:::
+lp:*:13510:0:99999:7:::
+nobody:*:13509:0:99999:7:::
+tc:*:15492:0:99999:7:::

0 comments on commit 33ef2c9

Please sign in to comment.