LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-19-2011, 11:23 AM   #1
tsrk
LQ Newbie
 
Registered: Oct 2011
Posts: 4

Rep: Reputation: 1
Multiple users logins on one terminal


I am looking through the linux user accouting implementation. A simple question that keeps bugging me is the possibility of multiple user logins from one single terminal or psuedo terminals. Is it possible for two or more users to login from one terminal?

I know of the 'su' possibility. One user may do 'su' to change to another user. Apart from this is there any other possibility?

Thanks in advance.
 
Old 10-19-2011, 10:09 PM   #2
Cr0wb4r
Member
 
Registered: Feb 2011
Distribution: Debian
Posts: 48

Rep: Reputation: 12
Perhaps you could put a bit more definition into "terminal". If you mean a single computer on the network then yes. If you mean a single terminal window then I suppose that if you "su" then technically you have more then one user logged in. But like I said, it depends on your definition of "terminal".
 
Old 10-19-2011, 10:49 PM   #3
tsrk
LQ Newbie
 
Registered: Oct 2011
Posts: 4

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by Cr0wb4r View Post
Perhaps you could put a bit more definition into "terminal".
What I mean by terminal is tty1, tty2....,pts/0,pts/1,....
The tty series and the pts series are the terminal names used by the login/getty programs to connect the local or the remote users to the machine.

Quote:
Originally Posted by Cr0wb4r View Post
If you mean a single computer on the network then yes.
In the case of text terminals / dump terminals, one single computer on a network serviced the dump terminals. In this context, the question gets simplified as follows: Is it possible for multiple users to login through the dump terminal somehow and show up in "w" / "who" command listing?


Quote:
Originally Posted by Cr0wb4r View Post
If you mean a single terminal window then I suppose that if you "su" then technically you have more then one user logged in. But like I said, it depends on your definition of "terminal".
With the graphical desktop environment, both gnome-terminal and KDE terminal open one "pts" for each terminal window. For the sake of clarity, we can talk of one terminal window as equivalent to one dump terminal / text terminal of previous generation. By default gnome-terminal and KDE terminal somehow login the GUI user into the terminal. Thus, by the time the terminal is open, a user is already logged in. Ignoring the "su" possibility, is there any other way for two users to show up in "w" / "who" commands as having a single terminal?

Thanks for the reply.
 
Old 10-19-2011, 11:47 PM   #4
Cr0wb4r
Member
 
Registered: Feb 2011
Distribution: Debian
Posts: 48

Rep: Reputation: 12
As far as tty terminals, I have run many different users on one system with each tty dedicated to a single user, so the answer to that would be yes.

I don't know about two users showing up in "w" / "who" as having a single terminal.

And I am pretty sure that all users who are logged in will show up when you do the "who" or "users" command along with each tty that that account is currently logged on to.

Feel free to play around with those things a bit and post your results here sot that others can learn from it as well.
 
Old 10-20-2011, 04:57 AM   #5
tsrk
LQ Newbie
 
Registered: Oct 2011
Posts: 4

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by Cr0wb4r View Post
As far as tty terminals, I have run many different users on one system with each tty dedicated to a single user, so the answer to that would be yes.
This point is clarified.Thanks.



Quote:
Originally Posted by Cr0wb4r View Post
I don't know about two users showing up in "w" / "who" as having a single terminal.
I read in Linux documentation that programs like init, logout and getty modify the /var/run/utmp and /var/log/wtmp files. The documentation also states that "w" / "who" commands pull their user data from the /var/log/utmp file. Theoretically it is possible for "w" / "who" to show two users with same terminal by adding one entry with new username and in-use terminal name in the /var/run/utmp and /var/log/wtmp files. The /var/run/utmp and /var/log/wtmp are binary files which handles the data in the units of utmpx structure. To the best of my knowledge, I have not come across any program which would store such an anomaly in either /var/run/utmp or /var/log/wtmp file.
I am just checking on this front. If any other program modifies the /var/log/wtmp or /var/run/utmp files, please let me know. I can read up more information on these yet unknown programs.


Quote:
Originally Posted by Cr0wb4r View Post
And I am pretty sure that all users who are logged in will show up when you do the "who" or "users" command along with each tty that that account is currently logged on to.
Going by the previous explanation, it may be possible to fool "w" / "who" into displaying wrong results.



Quote:
Originally Posted by Cr0wb4r View Post
Feel free to play around with those things a bit and post your results here sot that others can learn from it as well.
I am sort of playing around with the wtmp file anyway. The idea is to somehow integrate the "/var/log/wtmp" files of the LAN connected computers by making the local user login - logout accounting centralized. The transfer of information from a LAN computer to server will take place through syslog-ng client-server interaction. The network communication part is still in the ideation phase. Once the work is complete, I will post the results and the code.

Thanks for the help.
 
1 members found this post helpful.
Old 10-21-2011, 12:02 PM   #6
Cr0wb4r
Member
 
Registered: Feb 2011
Distribution: Debian
Posts: 48

Rep: Reputation: 12
Quote:
Originally Posted by tsrk View Post
I read in Linux documentation that programs like init, logout and getty modify the /var/run/utmp and /var/log/wtmp files. The documentation also states that "w" / "who" commands pull their user data from the /var/log/utmp file. Theoretically it is possible for "w" / "who" to show two users with same terminal by adding one entry with new username and in-use terminal name in the /var/run/utmp and /var/log/wtmp files. The /var/run/utmp and /var/log/wtmp are binary files which handles the data in the units of utmpx structure. To the best of my knowledge, I have not come across any program which would store such an anomaly in either /var/run/utmp or /var/log/wtmp file.
I am just checking on this front. If any other program modifies the /var/log/wtmp or /var/run/utmp files, please let me know. I can read up more information on these yet unknown programs.
Most interesting. I need to read the documentation on these things more in depth.
Depending on how it gets the results in theory this might be possible, and it would be interesting to run some tests.

Though I am not aware of any other programs that use /var/log/wtmp or /var/run/utmp.
 
Old 10-21-2011, 03:08 PM   #7
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
the answer really comes down to what you are attempting to actually DO, yes you can have multiple logins at one console
tty1 -> user1
tty2 -> user2
tty3 -> user4
...
ttyN -> user5

but herein lies the problem, the machine still only has one physical monitor, keyboard and mouse and can only display and interact with one TTY at a time

you could use hardware terminals such as WYSE terminals or terminal emulators running on low power machines attached to the serial ports to add the ability to have more users attached simultaneously (though this is limited to text only applications)
such as
/dev/tty1 -> user1
/dev/ttyS0 -> user2
/dev/ttyS1 -> user3
...
/dev/ttySN -. userN
(though this is limited to the number of serial ports your computer has + the actual display)

you could also enable telnet or (preferabley) ssh, and allow multiple users to simultaneously connect via lan

or you could (X11 only, but you can use terminal windows) add multiple video cards, keyboards, mice (limited by the number of slots and ports on the video cards) and create a 'multi seat' arrangement where each monitor/keyboard/mouse setup is it's own login session.

unfortunatly which of these solutions, if any, is relevant i can't tell you without further information as to your purpose.
 
Old 10-24-2011, 10:44 AM   #8
Cr0wb4r
Member
 
Registered: Feb 2011
Distribution: Debian
Posts: 48

Rep: Reputation: 12
Quote:
Originally Posted by frieza View Post
but herein lies the problem, the machine still only has one physical monitor, keyboard and mouse and can only display and interact with one TTY at a time
You have a point but I think that the purpose of the question by the OP is simply to learn more. As for the practical use of this knowledge, it seems to me that an intruder could use and manipulate files to hide their presence. Yeah I am sure we all know that crackers can "hide their presence" but once you understand "how" you have a new perspective on things.

Just my two cents.
 
Old 11-02-2011, 08:46 AM   #9
tsrk
LQ Newbie
 
Registered: Oct 2011
Posts: 4

Original Poster
Rep: Reputation: 1
Thanks frieza and Cr0wb4r for your insights. I do apologize for the delayed response.

The response by frieza has taken a new but interesting direction. I have always had this question in the back of my mind. The multi-seat Linux computer; Thanks for the impetus. I will appreciate very much if you can point me to a good starting point. I will look more into this.

Thanks for the help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Automating the terminal type with NIS logins kaplan71 Linux - Networking 2 01-31-2011 04:17 PM
Multiple GUI Logins jimferriz Linux - General 1 08-21-2010 07:57 PM
Squid and multiple logins??? rsmccain Linux - Software 2 08-12-2006 04:19 AM
multiple logins edgjerp Mandriva 8 02-24-2005 10:10 AM
Multiple Logins jbraum Mandriva 1 01-21-2004 06:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration