# pfssense like console menu



## Ercan Deger (Jul 30, 2021)

Hello,

How can I do  menu like pfsense at serial console?

No login prompt
show menu at console.

Thanks,


----------



## mark_j (Jul 31, 2021)

I know nothing of what you speak, but is it a [n]curses based menu? If so, in it's most basic form you can use tput(1) to move the cursor to a location , then printf/echo to draw text and read to accept input


----------



## Emrion (Jul 31, 2021)

I think it's something like:

```
0) Logout (SSH only)                  9) pfTop
 1) Assign Interfaces                 10) Filter Logs
 2) Set interface(s) IP address       11) Restart webConfigurator
 3) Reset webConfigurator password    12) PHP shell + pfSense tools
 4) Reset to factory defaults         13) Update from console
 5) Reboot system                     14) Disable Secure Shell (sshd)
 6) Halt system                       15) Restore recent configuration
 7) Ping host                         16) Restart PHP-FPM
 8) Shell

Enter an option:
```
If you look at the shell of the user "admin", you see: /etc/rc.initial.
This is a sh script that runs the menu in question. Just examine this file.

So, you have to define a shell for a given user. This shell can be a script and this script may do what you want.


----------



## mer (Jul 31, 2021)

That is what you get when you connect to the serial console and if you ssh in.
Setting that as a shell for the admin user will give you that when you ssh in, but not for the serial console.
Serial console is controlled by something else,  it used to be "getty".  Look at /etc/gettytab I think.  Look for autologin
entries;  that should be the hook back to the shell set for root user.


----------



## Ercan Deger (Jul 31, 2021)

mer said:


> That is what you get when you connect to the serial console and if you ssh in.
> Setting that as a shell for the admin user will give you that when you ssh in, but not for the serial console.
> Serial console is controlled by something else,  it used to be "getty".  Look at /etc/gettytab I think.  Look for autologin
> entries;  that should be the hook back to the shell set for root user.


gettytab works well, thanks.


----------

