Set of files and scripts for Embedded Lab 1
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

22 lines
652 B

  1. #!/bin/sh -
  2. # setup a base dir
  3. DESTDIR="$1"
  4. # copied and modified from release/tools/arm.subr
  5. # -w yes -> -w no
  6. /usr/sbin/pw -R ${DESTDIR} groupadd freebsd -g 1001
  7. mkdir -p ${DESTDIR}/home/freebsd
  8. /usr/sbin/pw -R ${DESTDIR} useradd freebsd \
  9. -m -M 0755 -w no -n freebsd -u 1001 -g 1001 -G 0 \
  10. -c 'FreeBSD User' -d '/home/freebsd' -s '/bin/sh'
  11. /usr/sbin/pw -R ${DESTDIR} \
  12. usermod root -w yes
  13. /usr/bin/sed -i '.bak' \
  14. -e 's/#PasswordAuthentication no/PasswordAuthentication no/' \
  15. -e 's/#ChallengeResponseAuthentication yes/ChallengeResponseAuthentication no/' \
  16. "${DESTDIR}/etc/ssh/sshd_config"