Code Monkey home page Code Monkey logo

dropbear-hacks's Introduction

This is a special fork of the dropbear SSH server with special hacks for running on embedded systems.

In particular is the problem that many embedded systems lack any sort of mapping between usernames, including "root", and user IDs. As such attempting to log into an SSH server as root (or any user) results in a failure due to an uninitialized passwd struct from getpwnam().

Further is the problem that, in some cases, you want the embedded device to run your own customized shell for logins rather than the default /bin/sh.

HACKS:

FAKE_ROOT: #define this to force a fake "root" uid resolution even if the target system can't resolve usernames.

ALT_SHELL: #define this to have fake root user log in with an alternate shell rather than /bin/sh

Server Master Password: specify -Y on dropbear command line to specify a "master" password to authenticate with. Useful with FAKE_ROOT when there is no root user, and therefore no root password.

Forced Home Directory: specify -H on dropbear command line to have user log in with specified home directory. Useful with FAKE_ROOT when there is no root user, and therefore no root home directory.

Note: I actually stole the master password and forced homedir hacks from somebody else's hacked busybox, but I don't recall where it came from.

BUILDING:

Export ALT_SHELL and FAKE_ROOT environment variables on the command line: ALT_SHELL=/tmp/bin/sh FAKE_ROOT=1 make

To build for MIPS target architecture, ensure a mips-linux-gcc is in your PATH, and use the buildmips.sh script: ALT_SHELL=/tmp/bin/sh FAKE_ROOT=1 ./buildmips.sh

dropbear-hacks's People

Contributors

zcutlip avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.