LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-22-2013, 04:40 AM   #1
appiah212
LQ Newbie
 
Registered: Apr 2013
Posts: 1

Rep: Reputation: Disabled
How configure linux to ask for password to access it terminal


I am new to linux, i will like configure it in such away that it will prompt me to provide password whenever i want to access terminal or the command console. I am using fedora.
 
Old 04-22-2013, 05:21 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
As a secruity thing, you really can't. there will ALWAYS be a way around what you appear to be askign for. Once you're lgged in, you're logged in. Just make sure that the account you are using is limited and use sudo or other security tools to require passwords when doing anything more complex.
 
Old 04-22-2013, 05:24 AM   #3
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
You can change the permissions of your terminal program so that only root can execute it or only members of a specified group can execute it. Try:
Code:
chmod --help
or
Code:
man chmod
for more information
jdk
 
Old 04-22-2013, 05:41 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
sounds like a good way to break a working system to me.
 
Old 04-23-2013, 12:45 AM   #5
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Quote:
Originally Posted by acid_kewpie View Post
sounds like a good way to break a working system to me.
Are you referring to my post? If yes, could you please explain. If it's directed at the OP then ignore this.
jdk
 
Old 04-23-2013, 01:38 AM   #6
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
A terminal is installed with OS, and every user on the system can access/open the terminal. You couldn't set a password for opening a terminal. However, the thing that makes difference is what a user can do after opening a terminal, which means, can that user invoke admin level commands or not or can he make any damage to the system (ofcourse using destructive commands)..

Well, let's know why do you want to set a password for terminal and what exactly your purpose is?
 
Old 04-23-2013, 02:00 AM   #7
eklavya
Member
 
Registered: Mar 2013
Posts: 619

Rep: Reputation: 136Reputation: 136
If you are thinking that terminal is like GUI application and you can provide password for it, it is not exact like this.
There are several ways to access command prompt without using terminal.
The best way is restrict your users to not give them enough privileges.

Suppose you find any software or application which asks password(I don't think it is really available) when you press ctrl+alt+t or click on terminal icon but this is not the only way. User can go in recovery mode and access command prompt from there.
you can't prevent them to press clt+alt+f1.

Do not provide sudo privileges to users, so they will not execute root level commands.
Do not provide root password to the user otherwise they they can use root level command using su - root if you have banned sudo for them.

Last edited by eklavya; 04-23-2013 at 02:01 AM.
 
Old 04-23-2013, 08:06 AM   #8
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,667
Blog Entries: 10

Rep: Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076Reputation: 2076
  1. Do not start x
  2. Do not login

Everyone will then be required to use a password to "open" terminal.
 
Old 04-23-2013, 03:46 PM   #9
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,654

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
Quote:
Originally Posted by eklavya View Post
If you are thinking that terminal is like GUI application and you can provide password for it, it is not exact like this.
There are several ways to access command prompt without using terminal.
The best way is restrict your users to not give them enough privileges.

Suppose you find any software or application which asks password(I don't think it is really available) when you press ctrl+alt+t or click on terminal icon but this is not the only way. User can go in recovery mode and access command prompt from there.
you can't prevent them to press clt+alt+f1.

Do not provide sudo privileges to users, so they will not execute root level commands.
Do not provide root password to the user otherwise they they can use root level command using su - root if you have banned sudo for them.
To expand a bit...

Normally terminal windows are just applications that use psudo-terminals to communicate with a shell. A pseudo terminal is dynamically created when opened, there is no restriction on doing that. The pseudo terminal is in two parts - the user application uses the half to pass keyboard activity , and receive output - which is then drawn into a window. The shell is attached to the other half, which acts like a hardware terminal for the shell. The shell reads keyboard input from the pty, and writes output to the pty.

You can get some information about pseudoterminals from the man page (man pty).
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to configure Linux to login with the terminal asoboleski Linux - Newbie 5 05-30-2012 01:06 AM
Terminal Server access from Linux inawaz Linux - Newbie 2 09-02-2010 07:44 PM
Password Recovery in Edubuntu 7.04 - In Terminal, Root Login : su , password : ????? farhannaeem13 Linux - Security 3 11-30-2007 10:59 AM
Configure the unix/linux server to use windows username and password sunhui Linux - Software 4 07-06-2006 10:36 AM
Can you access terminal services via linux Thaidog Linux - Newbie 2 08-29-2005 07:12 PM


All times are GMT -5. The time now is 06:19 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration