[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 396
  • Last Modified:

Finger-information

How can I achive that someone who logs in via
xdm is mentioned in the finger- or who-list?
Normally only console and telnet logins appear there.
Furthermore the console-logins should appear as tty-console
and not as tty1, tty2,...
How can I do that?
Thanks!
                 Steffen
0
steffen071697
Asked:
steffen071697
  • 4
  • 4
1 Solution
 
mgrcnkCommented:
You did not mention what system you are working with, but I will
assume you have the utility "w".  This utility is similar to
"who" and "finger", but it should be able to do what you want.
It will list all people currently using the system in a similar
manner to "who" and "finger".  It has always shown me who is
logged into my Solaris boxes (Sun and Intel) via xdm, so it will
probably help you as well.

As for the device names, tty1 is not the same device as
/dev/console, so they should not be listed as tty-console.  I can
work with you more on that question if you need me to, but your
question is somewhat confusing.

If this doen't help, then you may want to re-word your question
so it is not as confusing.
0
 
steffen071697Author Commented:
I am working on RedHat-Linux 4.2 but whenever I type w, who or finger the users who are logged in via xdm are not mentioned.
Except when they use xterm, but not when they use ordinary
programs such as netscape.
Any suggestions?
0
 
steffen071697Author Commented:
I am working on RedHat-Linux 4.2 but whenever I type w, who or finger the users who are logged in via xdm are not mentioned.
Except when they use xterm, but not when they use ordinary
programs such as netscape.
Any suggestions?
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
mgrcnkCommented:
They have to have some sort of shell open to log anything to the utmp file.  Otherwise, it doesn't know a netscape process from a syslogd process.  They are both just processes.  You can however, force an xdm user to have a login shell if you set up the .xsession correctly.  The .xsession file will start a window manager and any other programs you want it to (an xterm for example).  You can also set it up so that if the user closes the xterm it will log them out.  Does that help more?

chris
0
 
steffen071697Author Commented:
Hi Chris,
I think your answer helped me. Especially on understanding how the login-information is generated. However, I think most of my users do not want to have an xterm opened on login...
Any other possibility, maybe that the xdm-login is written/logged to the utmp-file? I saw that on the CDE (Sun) any logins appear in the finger information.
Regards,
              Steffen
0
 
mgrcnkCommented:
I am sure it is possible.  All you would have to do is edit the xdm startup (and logout) files.  They take care of setting device permissions and other such fun things.  I have never worked with programs that write data to utmp, so I would not be able to supply specific details.

Wait, I just found out how to do it.  The sessreg program handles utmp entries for xdm.  It should be in /usr/bin/X11/ (on the linux box I have it is).  Read the man pages on it for more info.

For xdm on Solaris, sessreg is used in GiveConsole, a script found in the xdm directory that runs initialization commands when a user logs in:

#!/bin/sh
# Assign ownership of the console to the invoking user
#
# By convention, both xconsole and xterm -C check that the
# console is owned by the invoking user and is readable before attaching
# the console output.  This way a random user can invoke xterm -C without
# causing serious grief.
#
chown $USER /dev/console
chown $USER /dev/sound/0
chown $USER /dev/sound/0ctl
sessreg -a -l $DISPLAY -x /usr/openwin/lib/X11/xdm/Xservers $USER

Hope this helps more.

chris
0
 
steffen071697Author Commented:
Whow!!!!
Man, you are great!
That`s it. Works fine. Nobody could answer this question which I posted through various mailinglists and newsgroups.
Many thanks and best regards,
             Steffen
P.S. I would rate this 500pts.
0
 
mgrcnkCommented:
Well, you could always email the management here and ask them to change the grade you gave me :)

Glad to help, though!

chris
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now