Solved

Finger-information

Posted on 1997-07-16
8
344 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
 
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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…

757 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now