LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-14-2016, 01:51 PM   #1
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Rep: Reputation: Disabled
How to login in from separate terminals in same OS instance?


CentOs 7

I used su to login as root.
I created several accounts,e.g. a1, b1, c1

Then I created two groups, gp1, gp2, and a directory, test
with owner a1, and group as gp1.

Then I added gp1 to a1.
Now I like to test permissions via
login on 3 terminals for a1, b1, and c1.

But whenever I am in root and did this:
Code:
[root@localhost ~]# login a1

The terminal closed immediately.


And when in another user account with admin privileges,
I do not get prompted for password.
Nothing happens.
the prompt just returns.... like so:
Code:
[user1@localhost ~]$ login a1
[user1@localhost ~]$
Here are the created accounts:
Code:
... ...
user1:x:1000:1000:user1:/home/user1:/bin/bash
a1:x:1001:1001::/home/a1:/bin/bash
b1:x:1002:1002::/home/b1:/bin/bash
c1:x:1003:1003::/home/c1:/bin/bash
I am able to login to another account if I logged off from current account. But this does not allow me to test permissions quickly!

How to login in from separate terminals in same OS instance?
Meaning all login accounts are active (not log-off), and I can easily switch between them via the terminals.

Thank you.

Last edited by fanoflq; 09-14-2016 at 01:54 PM.
 
Old 09-14-2016, 01:55 PM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Not sure if I understand your problem.
Code:
su - user1
will log you in as user1 from your root account. Ctrl+D will log you out back to your root login.
 
1 members found this post helpful.
Old 09-14-2016, 02:04 PM   #3
fanoflq
Member
 
Registered: Nov 2015
Posts: 397

Original Poster
Rep: Reputation: Disabled
@Emerson :

That did the trick.
Thank you.
 
Old 09-15-2016, 03:26 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,362

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Fyi, 'exit', will also log you out of the other acct and back to the original. Its just a another terminal session, no special handling reqd.
 
  


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
Separate X sessions on different terminals? 273 Linux - Desktop 6 12-27-2011 08:58 PM
how to install 2nd debian instance from .deb file, showing up as separate grub entry bweaver Linux - Newbie 4 11-15-2011 09:07 AM
Unable to login to SVN for a instance created in a NEW Partition. moinulla Debian 1 12-15-2010 07:38 PM
unable to login f1 to f6 terminals reply2vinay Linux - Hardware 6 09-05-2005 12:44 AM
Over 100 terminals open automatically after login kimbergross Linux - Newbie 1 10-01-2003 07:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:01 PM.

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