Last update 27-Jan-2002
mblogin - Unix login replacement for MBSE BBS.
Synopsis.
mblogin [-p] [-h hostname] [user]
Description.
mblogin replaces the standard Unix login program for MBSE BBS. You can use this program from mgetty for modem/ISDN access, or from inetd to allow telnet access. This program logs in the systems syslog facility because the normal login program does this too. It uses the file
/opt/mbse/etc/login.defs
for the behaviour you prefere. All options in this file are well commented. It uses the bbs user database to see who are allowed to login. Users can use their Fidonet name, Unix name or Handle. If the name is found in the userbase, the name is replaced with the real Unix name to do the password check and to start the mbsebbs program. If the user is not found in the user base, the user is asked if he wants to register as a new user. This behaviour can be turned off. If the user uses the name bbs he will start the mbnewusr program directly. All other users are not allowed to login, not even root. If you change it in the file/opt/mbse/etc/login.defs
you may allow user mbse to login. I advice against it, you should use ssh if you want remote access to do maintenance.
How to use from telnetd.
If your system is connected to the internet you may want to let users login using telnet. The changes you need to make are different for each operating system mbse supports. I will only describe how to use it from inetd, not xinetd. When you make changes to your system to change the telnet login, make sure you are already logged into your system as root from another terminal. If you make a mistake and can't login anymore you will be glad that you are still logged in on another terminal. Here are the tested setups:
Now you can test it with
- Linux: edit the telnet line in /etc/inetd.conf:
telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd -L /opt/mbse/bin/mblogin
After changing this file do a kill -HUP pid where pid is the pid of the inetd process.- FreeBSD: edit the telnet line in /etc/inetd.conf:
telnet stream tcp nowait root /usr/libexec/telnetd telnetd -p /opt/mbse/bin/mblogin
After changing this file do a kill -HUP pid where pid is the pid of the inetd process.- NetBSD: append a line in /etc/gettytab just below the line with the default entry:
mbsebbs:cd:ck:np:lo=/opt/mbse/bin/mblogin:sp#38400:
The speed entry 38400 doesn't seem to be important. Then edit the telnet line in /etc/inetd.conf:
telnetd stream tcp nowait root /usr/libexec/telnetd telnetd -g mbsebbs
After changing this file do a kill -HUP pid where pid is the pid of the inetd process.telnet localhost
or from another machine withtelnet your.machine.com
. Check if you can still do other logins such as ssh, rlogin and login on local consoles.
How to use from mgetty
This is described with the setup for mgetty.