Ask for password when using serial connection?



  • Hi there,

    is it possible to activate password request when connecting over serial connection to the Omega?
    I´ve read something about busybox but not sure if this is the right way. Any help is appreciated.



  • @DocHardinger When you ask about a "serial connection" I'm assuming you are using a terminal connection either via USB or you have a custom board with something like RS232 connection. Either way, when you see the terminal prompt you an set the password using the passwd command. Then you'll be prompted for a password and required to confirm the password. Then use the exit command, you'll be prompted with "Please press Enter to activate this console." so press ENTER key, you'll be prompted for username, enter root then you'll be prompted for the password you set.

    If I misunderstand your question, please provide more detail.



  • Thx for your answer.
    You´re right i´m using a terminal connection over rs232 with usb.
    The root password is set to onioneer as default. Anyway i tried to set it again with passwd and followed your instructions.
    But still i can connect without entering a password. I think this has somethin to do with busybox. See this post: https://forum.archive.openwrt.org/viewtopic.php?id=16900 . But im not sure how to do it on the omega. Or is there another way to ask for password when connecting over serial? Thx for your help.



  • Hi @DocHardinger

    Use the command uci show system and look for system.@system[0].ttylogin, it should be set to 1, not 0. To change it you can edit /etc/config/system, or use the command:

    uci set system.@system[0].ttylogin='1' && uci commit system

    Then reboot and check.

    Otherwise you need to use the build system to add the BusyBox login plugin, the details of how to do this are here:

    https://oldwiki.archive.openwrt.org/doc/howto/serial.console.password

    The standard Onion build already has this option turned on but I think you also need another option on also so BusyBox will read /etc/inittab, this option is:

    Base System -> BusyBox -> Init Utilities -> linuxrc

    Then update the inittab per the article above.



  • Thx for your answer, still didnt find the time to check if that works. Anyway i will give it a try soon.



  • @DocHardinger No worries, please report back when you have time to check it. I use this myself to secure my TTY when my devices are not on my development network.



  • @crispyoz said in Ask for password when using serial connection?:

    uci set system.@system[0].ttylogin='1' && uci commit system

    uci set system.@system[0].ttylogin='1' && uci commit system
    

    This did the trick, Thx sir!


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.