Changeset 9cf508e in freewrt


Ignore:
Timestamp:
Jul 21, 2006, 3:52:46 PM (19 years ago)
Author:
Markus Wigge <markus@…>
Branches:
freewrt_1_0, freewrt_2_0
Children:
0631111
Parents:
1d8c05f
Message:
  • added runtime config for password
  • added runtime config for ssh-key
  • added mkpasswd for crypt-md5 generation (needed for runtime password config)

git-svn-id: svn://www.freewrt.org/trunk/freewrt@325 afb5a338-a214-0410-bd46-81f09a774fd1

Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • package/Config.in

    r1d8c05f r9cf508e  
    362362          http://www.freewrt.org/downloads/snapshots/@TARGET@/packages
    363363
    364 endmenu
     364config BR2_RUNTIME_PASSWORD
     365        string "root password"
     366        default "FreeWRT"
     367        help
     368          Predefine the root password enabled in the the built image
     369
     370          - Leave empty to disable password login, beware: TELNET WILL BE OPEN!
     371          - type "-KEY-" to only allow ssh key login and define the ssh-key in
     372            the next step.
     373
     374config BR2_RUNTIME_SSHKEY
     375        string "SSH public key"
     376        default ""
     377        help
     378          Paste your generated SSH public key here and it will be embedded into
     379          the built image, so you can use it to login instantly.
     380
     381endmenu
  • package/base-files/Makefile

    r1d8c05f r9cf508e  
    3636PACKAGES_INSTALL:=$(IPKG_BASE) $(IPKG_UCLIBC)
    3737
     38MD5CRYPT := $(shell $(MKPASSWD) "$(BR2_RUNTIME_PASSWORD)")
     39
    3840ifeq ($(BR2_PACKAGE_LIBGCC),y)
    3941PACKAGES+=$(IPKG_LIBGCC)
     
    6264                    -e '/^src freewrt/s,"\(.*\)",\1,' $(IDIR_BASE)/etc/ipkg.conf
    6365        $(SED) 's,@TARGET@,$(BOARD)-$(KERNEL),g' $(IDIR_BASE)/etc/ipkg.conf
     66        test $(BR2_RUNTIME_PASSWORD) -eq "-KEY-" || (||
     67            test -n $(BR2_RUNTIME_PASSWORD) && \
     68                $(SED) 's,*NP*,$(MD5CRYPT),g' $(IDIR_BASE)/etc/passwd || \
     69                $(SED) 's,*NP*,,g' $(IDIR_BASE)/etc/passwd \
     70        )
     71        test -n $(BR2_RUNTIME_SSHKEY) && ( \
     72            mkdir -p $(IDIR_BASE)/etc/dropbear \
     73            echo $(BR2_RUNTIME_SSHKEY) > $(IDIR_BASE)/etc/dropbear/authorized_keys \
     74        )
    6475        mkdir -p $(IDIR_BASE)/dev
    6576        mkdir -p $(IDIR_BASE)/etc/crontabs
  • package/base-files/default/etc/passwd

    r1d8c05f r9cf508e  
    1 root:$1$$M/vfMxhSbKMGpvL4Uxt1G/:0:0:root:/tmp:/bin/ash
    2 admin:$1$$M/vfMxhSbKMGpvL4Uxt1G/:100:100:admin:/tmp:/bin/ash
     1root:*NP*:0:0:root:/tmp:/bin/ash
     2admin:*NP*:100:100:admin:/tmp:/bin/ash
    33nobody:*:65534:65534:nobody:/var:/bin/false
  • tools/Makefile

    r1d8c05f r9cf508e  
    44
    55TARGETS:=       paxmirabilis sed ipkg-utils brcm-utils lzma
    6 TARGETS+=       squashfs jffs2
     6TARGETS+=       squashfs jffs2 mkpasswd
    77
    88TARGETS_INSTALL:=$(patsubst %,%-install,$(TARGETS))
Note: See TracChangeset for help on using the changeset viewer.