HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: restrict remote login
Operating System - HP-UX
1832552
Members
5873
Online
110043
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
08-03-2001 08:08 AM
08-03-2001 08:08 AM
restrict remote login
This might be a trivial question, but does anyone know how to restrict remote login for a certain account so that users MUST "su" into the account instead of remote login?
Thanks!
Thanks!
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2001 10:50 AM
08-03-2001 10:50 AM
Re: restrict remote login
There is no way to do this as there is for root. Requiring root to always use su is a common mechanism and is accomplished with either:
echo console > /etc/securetty
or
cat /dev/null > /eetc/securetty
In the first case, root (or any login with UID=0) can login to the console, but in the second case, root can never login (pretty secure, eh?). Instead, users must login as an ordinary user ID, then use su - root to attain root privileges, thus requiring two passwords and two logging steps.
For ordinary users, you would have to write special code in /etc/profile (and /etc/login.csh if necessary) to detect these special user(s) and give an error message when an incorrect login is attempted.
Bill Hassell, sysadmin
echo console > /etc/securetty
or
cat /dev/null > /eetc/securetty
In the first case, root (or any login with UID=0) can login to the console, but in the second case, root can never login (pretty secure, eh?). Instead, users must login as an ordinary user ID, then use su - root to attain root privileges, thus requiring two passwords and two logging steps.
For ordinary users, you would have to write special code in /etc/profile (and /etc/login.csh if necessary) to detect these special user(s) and give an error message when an incorrect login is attempted.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2001 02:33 PM
08-04-2001 02:33 PM
Re: restrict remote login
Hello Huyen,
in addition to Bill's answer, when you have X-Windows
(i.e. CDE) set up and running, your restricting code
has to go into "Xsetup" or "Xstartup" in the directory
"/etc/dt/config/" - when those script have an exit-value
other than 0, then they will deny login.
HTH,
Wodisch
in addition to Bill's answer, when you have X-Windows
(i.e. CDE) set up and running, your restricting code
has to go into "Xsetup" or "Xstartup" in the directory
"/etc/dt/config/" - when those script have an exit-value
other than 0, then they will deny login.
HTH,
Wodisch
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-05-2001 10:53 PM
08-05-2001 10:53 PM
Re: restrict remote login
You means that certain user can only login in from console or su ?
You can revise the /etc/profile to get to this :
-=-=-=-=
trap "" 1 2 3
#put the real user account as username below
USER=username
HOSTNAME=$(hostname)
Login_Host=$(who -R | grep $USER| tail -1 | awk '{print $6}')
AllowLogin=$(grep $HOSTNAME "$Login_Host")
if test "$Allowlogin" -eq ""
then
#Not allowed in
echo You are not allowed to login from $Login_Host as $USER
exit
fi
trap 1 2 3
-=-=-=-=-=
Then now username is only allow to login on cosole or through su .
You can revise the /etc/profile to get to this :
-=-=-=-=
trap "" 1 2 3
#put the real user account as username below
USER=username
HOSTNAME=$(hostname)
Login_Host=$(who -R | grep $USER| tail -1 | awk '{print $6}')
AllowLogin=$(grep $HOSTNAME "$Login_Host")
if test "$Allowlogin" -eq ""
then
#Not allowed in
echo You are not allowed to login from $Login_Host as $USER
exit
fi
trap 1 2 3
-=-=-=-=-=
Then now username is only allow to login on cosole or through su .
Hi Friend
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP