LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   who is logged in? (Debian wheezy, current) (https://www.linuxquestions.org/questions/debian-26/who-is-logged-in-debian-wheezy-current-932251/)

kaz2100 03-01-2012 07:05 PM

who is logged in? (Debian wheezy, current)
 
Hya,

I am somewhat confused.

System
Debian wheezy, current as of 1/mar/2012 UTC

Situation
After console login, (no display manager, conventional login)
Code:

>who
>

then startx and open xterm
Code:

>who
penguin  pts/1        2012-03-02 08:55 (:0)
>

If I remember correct, penguin is supposed to be log in through tty1.

Can anybody point out where problem is?

Sidicas 03-01-2012 07:30 PM

tty is the regular text login prompts (Ctrl+Alt+F1 through Ctrl+ALT+F6)..

When you open X you automatically get bumped to the X session on Ctrl+ALT+F7, and then when you open a terminal from inside of an X session, it's pts. If you use Ctrl+ALT+F1, you can go back to your tty.

kaz2100 03-01-2012 09:23 PM

Thanks,

I guess I did regular text login. Conventional console login, as I did pre X age.

kaz2100 03-07-2012 11:57 PM

Hya,

Self reply.

I checked two X86 laptop penguins. (Debian wheezy, but kernel is 3.1.8)
Code:

>who
penguin  tty1        2012-03-08 08:55
>

after console login.

I checked bug reports on Debian but no report.

Post #1 was done on amd64 ones. I guess something is wrong with amd64 Debian wheezy.

Can anybody reproduce this? If necessary I will submit bug report.

Cheers

widget 03-08-2012 01:21 AM

tom@debian:~$ uname -a
Linux debian 3.2.0-1-amd64 #1 SMP Fri Feb 17 05:17:36 UTC 2012 x86_64 GNU/Linux
tom@debian:~$ who
tom tty7 2012-03-08 00:16 (:0)
tom pts/0 2012-03-08 00:20 (:0.0)
tom@debian:~$

kaz2100 03-08-2012 04:30 PM

Hya,

Thanks, widget.

Your debian looks good.

I tried another x86 wheezy, (3.2.8 kernel) and NOT good.

So far,

all amd64 ones are NG. (even with 3.1 kernel)
One x86 (with 3.2.8) is NG.
Two x86's (with 3.1, and with 3.2.4) are OK.


I need to narrow down. Version of who command is 8.13 (x86, amd64).
Is this kernel related or something else?

One thing I need to check is date of last dist-upgrade. (Not all of them are "current as of 1/Mar")

cheers

widget 03-08-2012 06:32 PM

I need to go "visit" my other installs.

Will give it a whack on one of my Sid install and see what that does.

widget 03-08-2012 09:33 PM

Sid works fine too.

I do however have a question.

Are you sure you are not logging in at a root prompt?

kaz2100 03-09-2012 04:37 PM

Hya,

Thanks, widget.

It is nice to have good penguin.

What is "root prompt"?

$prompt (tcsh) or $PS1 (bash)??

My situation is:
power on, lilo goes, many lines show, NO X kicked in (no XDM, GDM..) login

Some wheezy Penguins, who shows somebody on tty1,
while the others, who returns nobody.

cheers

widget 03-09-2012 06:13 PM

A user prompt is the $.

A root prompt is the #.

If you log in on the root prompt you are logged in as root.

If you have set up a background other than the default on your install in user land and log in as root you will see the default background as it has not been changed for user root.

I doubt this is the case but it would explain how you are getting logged in that way.

If you are just missing a log in manager you could boot to recovery and that should take you to an option of giving your root password so you can do what ever maintainance you need to do. That would include things like;
Code:

apt-get install gdm3
Gdm3 is a display manager but if you just want a login manager "slim" could be put in place of gdm3.

I am not a big fan of Slim (Simple Log In Manager). Have had some problems with it on some installs and none on others. Am getting to the point I think it is simple to the point of being silly. It does however log me in at the proper level.

Slim certainly pulls in fewer depends.

Assuming you are using gnome the depends will not be that much with gdm either as most will be there. I use Xfce so it is a little different.

Xdm is alright too and certainly lighter than gdm3.

If you are simply having a problem with gdm3 you could log into recovery and run;
Code:

dpkg-reconfigure gdm3
and see if that helps.

If not maybe;
Code:

apt-get purge gdm3
followed by;
Code:

apt-get install gdm3
would straighten it out

kaz2100 03-10-2012 04:34 PM

Hya,

Thanks, however, my description might not have been clear.

I am NOT using gdm or whatever. My penguins do not have any of them.

Question is:
why nobody is logged in thrugh tty1? In this case, why "penguin" is missing?

widget 03-10-2012 05:39 PM

OK. You are checking this before you startx or after? If before that would be fine. If after it is really strange.

If you are checking this after starting x do you have root permissions all the time?

kaz2100 03-11-2012 07:47 AM

Hya,

widget: please refer my posts #1 and #3. With me, I have been able to start X (or motif) with user permission on many systems, (Linux, Sun Solaris, HP-UX..), so my system set up looks different from yours.



I checked history of system upgrade.

One wheezy penguin, (who can find user on ttyX), last update dist-upgrade was on Feb 16 2012.

Today, I did update dist-upgrade, then BINGO.. (probably NON bingo), who cannot find users on ttyX. I did not touch kernel.

So, problem is not kernel related. Neither coreutil nor libacl was upgraded. One suspicious package is consolekit, which was upgraded from 0.4.5-1 to 0.4.5-3.

cheers

widget 03-11-2012 11:51 AM

I was just checking because, as you say, this is very strange.

You should be able to start x with user permissions. Kind of hard to run with user permissions without x.

This kind of driving me nuts. Nuttier than usual anyway.

I think I am going to do another install with out a DM or login manager. It is hard to know if I am actually recreating your conditions with a DM installed.

I can always find use for another testing install anyway. Some people collect doilies, I collect installs of Linux.

kaz2100 03-11-2012 07:59 PM

Hya,

Strange point is that who command cannot detect user(s) on ttyX. I do not think any privilage/permission issue related.

cheers

widget 03-14-2012 01:22 PM

Finally got around to installing Debian Squeeze with out a login manager. Netinstall. OpenBox for the DE.

Log in and then run "who".

Logged in at tty1.

Don't have the out put on this drive or install but it is the same as what you are getting. Beats me.

Doesn't seem to effect the way anything works.

kaz2100 03-14-2012 08:06 PM

Hya,

Thanks, it looks like that squeeze works fine.
So, I need to figure out where in wheezy is responsible for failing to detect user(s) on ttyX.

My guess is:
who (coreutil package) is NOT. (reason, same version sometimes works, sometimes NOT)
kernel (custom compiled) is NOT. (reason, same as who)
consolekit may be, but probably NOT, because who works without consolekit.

Currently,
I am trying to decipher /var/run/utmp file.

cheers

kaz2100 03-28-2012 08:39 PM

Hya,

I am still having trouble. I do not have any experience with utmp. I am following variables by debugger, program is as simple as it could be.
Code:

#include <stdio.h>
#include <utmp.h>

int main(int argc, char **argv){

struct utmp        *rut;
struct utmp        ut;

setutent();
rut = getutent();
ut.ut_type = USER_PROCESS;

rut = getutid(&ut);

return 0;

}

Can anybody direct me where next step is?

cheers

kaz2100 04-23-2012 09:53 PM

Hya,

After long interval, still not solved.

Key part of ource code of who (from coreutils) looks like
Code:

who (const char *filename, int options)
{
  size_t n_users;
  STRUCT_UTMP *utmp_buf;

  if (read_utmp (filename, &n_users, &utmp_buf, options) != 0)
    error (EXIT_FAILURE, errno, "%s", filename);

  if (short_list)
    list_entries_who (n_users, utmp_buf);
  else
    scan_entries (n_users, utmp_buf);

  free (utmp_buf);
}

and
Code:

#  define GET_UTMP_ENT getutxent
I guess a little bit more to go.

kaz2100 07-04-2012 07:42 PM

Hya

Self reply.

After a long interval, I checked this issue again.
Code:

>who
penguin  tty2        2012-07-05 07:24
penguin  pts/1        2012-07-05 07:24 (:0)
penguin  pts/0        2012-07-05 07:24 (:0)
>

Two xterm's are open, after console login. So, I guess it is good now.

Have a Happy Penguin!


All times are GMT -5. The time now is 11:40 PM.