Solved

Finger-information

Posted on 1997-07-16
8
372 Views
Last Modified: 2013-12-16
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
Comment
Question by:steffen071697
  • 4
  • 4
8 Comments
 
LVL 1

Accepted Solution

by:
mgrcnk earned 100 total points
ID: 1812589
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
 

Author Comment

by:steffen071697
ID: 1812590
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
 

Author Comment

by:steffen071697
ID: 1812591
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:mgrcnk
ID: 1812592
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
 

Author Comment

by:steffen071697
ID: 1812593
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
 
LVL 1

Expert Comment

by:mgrcnk
ID: 1812594
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
 

Author Comment

by:steffen071697
ID: 1812595
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
 
LVL 1

Expert Comment

by:mgrcnk
ID: 1812596
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question