- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Prevent direct Login
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2005 07:32 AM
09-01-2005 07:32 AM
We have the application ID's login directly to the systems. We want to prevent the application ID's ( eg : oracle) directly login to the system. Instead, the user has to login with their ID first and then do su - appID to the application .
How do we do this ?
Thanks in Adv for the help !
Rgds / JPMC
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2005 08:23 AM
09-01-2005 08:23 AM
Re: Prevent direct Login
In the /etc/passwd file, change the shell for the user account to /bin/false. Users can ftp and su to that account but not be able to login. (Have not tested yet)
Use the output from 'who am i' and compare this with a file you create called '/etc/nodirectlogin'
In the /etc/profile you have something similar;
WHO=`${who am i|awk '{print $1}'
grep -q "^$WHO:" /etc/nodirectlogin
if [ $? = 0 ]
then
echo "$WHO cannot login directly"
fi
The /etc/nodirectlogin file has;
oracle
sybase
etc...
In the second example, just test for a user name in the /etc/profile, depending on the result, allow access or not. This will not affect the ability to su -
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2005 08:26 AM
09-01-2005 08:26 AM
Re: Prevent direct Login
Then edit the /etc/security/access.conf file and specify that the user is not allowed to logon locally.
-:oracle:LOCAL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2005 09:00 AM
09-01-2005 09:00 AM
Re: Prevent direct Login
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2005 06:31 PM
09-01-2005 06:31 PM
Re: Prevent direct Login
I just checked the man page of login program. Interestingly it checks /etc/usertty files for login restrictions, I believe you can configure it for users, groups wise.
check the man page of login
Hope this helps,
Gopi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2005 10:56 PM
09-01-2005 10:56 PM
Re: Prevent direct Login
if [[ $USER = "oracle" ]]
then
echo "plz login with your own ID. Then do su to applicaiton login ID"
sleep 5
exit 1
fi
Put this. It will start to work.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2005 01:21 AM
09-02-2005 01:21 AM
Re: Prevent direct Login
If you want to use that, use the stty to disable the interrupt/break keys.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2005 02:37 AM
09-02-2005 02:37 AM
Re: Prevent direct Login
You can install sudo , and its very good tool to restrict users and various permission.
You may look at this link :
http://www.courtesan.com
Cheers ,
Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2005 03:51 AM
09-02-2005 03:51 AM
Re: Prevent direct Login
Change the application ID password so that it contains # or @ . Now with a telnet session this ID wont be able to login directly. This is my experience with HP-UX so far I havent tested on linux.
Regards,
Syam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2005 04:32 AM
09-02-2005 04:32 AM
Re: Prevent direct Login
If you are going to use that solution, you should use sudo to enable users use su as root to applications users.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2005 04:55 AM
09-02-2005 04:55 AM
SolutionThere's an option for sshd_config called AllowedGroups (or something like that).
create a group 'interactive' and add all 'real' users to it, but not others like oracle,dba,bin,sys,lp and the likes.
Every user that is not contained in the group will be prohibited login after daemon restart.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2005 04:59 AM
09-02-2005 04:59 AM
Re: Prevent direct Login
I think JPMC's need is to know who all are currently logged into the system. May be he doesnt mind to share the applID password with the users if this is his purpose.
Regards,
Syam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-02-2005 05:09 AM
09-02-2005 05:09 AM
Re: Prevent direct Login
You need to ensure to trap ^C and other commands, otherwise the oracle user will probably be logged in if someone hit's ^C, killing the sleep process.