Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Finger-information

Posted on 1997-07-16
8
Medium Priority
?
389 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 1

Accepted Solution

by:
mgrcnk earned 200 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

704 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