LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices

Reply
 
LinkBack Search this Thread
Old 07-25-2013, 01:17 PM   #1
manoj.linux
Member
 
Registered: Aug 2007
Posts: 219

Rep: Reputation: 15
Question disabling direct login for normal application user


Hi,

how to disable direct login for application user like oracle?

but oracle user can login using su.

Please suggest.
 
Old 07-25-2013, 05:56 PM   #2
derekpock
Member
 
Registered: Apr 2012
Location: USA
Distribution: Xubuntu 12.10
Posts: 57

Rep: Reputation: 4
I am not sure what you are asking, can you provide more info? Direct login as in auto-login to the computer? And is "oracle" java or is this a username?
 
Old 07-25-2013, 11:06 PM   #3
manoj.linux
Member
 
Registered: Aug 2007
Posts: 219

Original Poster
Rep: Reputation: 15
Question

Thanks Derekpock for your response.

My requirement is that I want that Oracle user should not able to login directly using putty,

However I want that first user A login after that he su - oracle.

Please suggest.
 
Old 07-26-2013, 12:25 PM   #4
derekpock
Member
 
Registered: Apr 2012
Location: USA
Distribution: Xubuntu 12.10
Posts: 57

Rep: Reputation: 4
Ok, to remove certain users from ssh login, do the following: You will need to be logged into the ssh accessed machine.
Code:
"sudo nano /etc/ssh/sshd_config"
Add the following line to the end of the document. Add or remove usernames as necessary. Do NOT include the actual "[username2], just put whatever users you want to not be able to login using ssh.
Code:
"DenyUsers Oracle [username2] [username3]..."
Save the file and then do:
Code:
"sudo service sshd restart"
That will disable Oracle, [username2], and [username3] from logging in using ssh. You can still, however, use "su Oracle" to change to Oracle after logging in with another user.
 
Old 07-30-2013, 09:09 AM   #5
dubnik
Member
 
Registered: Dec 2006
Location: slovakia
Distribution: CentOS, Fedora
Posts: 32

Rep: Reputation: 0
if you don't want user to be able to log in
you should add user without shell


useradd -s /bin/nologin
 
Old 07-30-2013, 09:33 AM   #6
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,435
Blog Entries: 11

Rep: Reputation: 181Reputation: 181
Quote:
Originally Posted by dubnik View Post
useradd -s /bin/nologin
By doing so he would not be able to su to that user. Also sudo -u orcale would still work.
 
Old 07-31-2013, 06:35 AM   #7
dubnik
Member
 
Registered: Dec 2006
Location: slovakia
Distribution: CentOS, Fedora
Posts: 32

Rep: Reputation: 0
yes you're right

sorry I have read wrong the first article.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Installed application with root privileges, need to run as normal user sabresong Linux - Newbie 3 07-28-2012 06:26 PM
how do I set different permission for single user for sudo login n direct login? bhaveshvv109 Linux - Security 2 11-08-2011 08:23 PM
Unable to login as a normal user! kris_rocks! Red Hat 1 02-24-2010 01:31 PM
Disabling direct console login: forcing su nitinatindore Linux - Security 4 05-09-2007 12:10 AM
How to login as a normal user? daYz Slackware 5 11-14-2003 02:35 PM


All times are GMT -5. The time now is 05:08 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration