Hi all! wtmp entries are generated when loggin into a system without a command, e.g. "ssh -l user system". When using an additional command executed by ssh on the "other side", no wtmp entry will be generated. So the command "ssh -l user system /bin/csh" will not generate a wtmp entry but the user is logged in ... I have the problem right know. The users are starting "xterm" by ssh commandlines and I can't see a wtmp login ... not very nice. Is somebody working on a patch/feature? E.g. an option in sshd_config (forced_wtmp) would be nice. Greets Randolf
Randolf Skerka wrote:> > Hi all! > > wtmp entries are generated when loggin into a system without a command, > e.g. "ssh -l user system". When using an additional command executed by > ssh on the "other side", no wtmp entry will be generated. So the command > "ssh -l user system /bin/csh" will not generate a wtmp entry but the > user is logged in ... I have the problem right know. The users are starting > "xterm" by ssh commandlines and I can't see a wtmp login ... not very nice. > Is somebody working on a patch/feature? E.g. an option in sshd_config > (forced_wtmp) would be nice. > > Greets > > RandolfI'll second that request. Unfortunetly its not quite as simple as it could be, as there is not 'device' to register in the utmp/wtmp databases. You could, however either use a simple lock-dir to grab 'devices', a simple database (this is what samba does http://pserver.samba.org/cgi-bin/cvsweb/samba/source/smbd/session.c?only_with_tag=SAMBA_2_2 ) or just somthing based on the daemon's pid. The standard used in samba's case is 'what does ftpd do' as to what to put in the various databases. Andrew Bartlett abartlet at pcug.org.au -- Andrew Bartlett abartlet at pcug.org.au
try to use ssh -t host command is this ok? why do you need wtmp? ssh just emulates the traditional rsh/rlogin behaviour. wtmp gets updated only if you allocate a tty. every login is registered in /var/log/authlog
--On Monday, May 07, 2001 8:32 AM +0200 Randolf Skerka <Randolf-ML at Skerka.de> wrote:> user is logged in ... I have the problem right know. The users are > starting "xterm" by ssh commandlines and I can't see a wtmp login ... not > very nice. Is somebody working on a patch/feature? E.g. an option inxterm should be adding utmp/wtmp entries. Try changing its resource file to set the appropriate option. -- Carson
On Mon, 7 May 2001, Markus Friedl wrote:> try to use > ssh -t host command > > is this ok? > > why do you need wtmp? ssh just emulates the > traditional rsh/rlogin behaviour. wtmp gets > updated only if you allocate a tty. > > every login is registered in /var/log/authlogI have got another idea - maybe it would be more useable to log info about user, that logged in without tty, into wtmp like it does wu-ftpd (and probably others ftp servers) - it adds an entry like: moon ftp pe16.warszawa.ad Tue Apr 3 12:34 - 21:53 (09:19) And insted "ftp" ssh should use for example "sshnotty" or something similar :) Best regards, Krzysztof Oledzki
On Wed, May 09, 2001 at 08:35:01PM +0200, Krzysztof Oledzki wrote:> > > On Mon, 7 May 2001, Markus Friedl wrote: > > > try to use > > ssh -t host command > > > > is this ok? > > > > why do you need wtmp? ssh just emulates the > > traditional rsh/rlogin behaviour. wtmp gets > > updated only if you allocate a tty. > > > > every login is registered in /var/log/authlog > > I have got another idea - maybe it would be more useable to log info > about user, that logged in without tty, into wtmp like it does wu-ftpd > (and probably others ftp servers) - it adds an entry like: > > moon ftp pe16.warszawa.ad Tue Apr 3 12:34 - 21:53 (09:19)why abuse lastlog? why not use /var/log/authlog?