- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Restricting user access
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
02-22-2001 04:49 AM
02-22-2001 04:49 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2001 05:10 AM
02-22-2001 05:10 AM
Re: Restricting user access
"man inetd.sec" will probably help you.
Regards,
Patrice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2001 05:19 AM
02-22-2001 05:19 AM
Re: Restricting user access
If you are using sshd v2 for remote sessions, then you can easily restrict user access from specific IP addresses by simply making use of the SSH2_CLIENT variable which reflects the IP address from which you connect from and the LOGNAME variable.
Using these two variables in /etc/profile, you can force a user to disconnect if the LOGNAME and SSH2_CLIENT variables are not associated.
Hope this helps. Regards.
Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2001 05:35 AM
02-22-2001 05:35 AM
Re: Restricting user access
Edit /etc/profile and /etc/cshrc and check tty
whith tty command az user with $LOGNAME or id -un command. Exit if not allowed.
With the /var/adm/inetd.sec file You can filter acces by IP address.
regards, Saa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2001 07:26 AM
02-22-2001 07:26 AM
Solutionsimilar to /etc/securetty for root), adding the following statements to
/etc/profile or /etc/csh.login should prevent a certain user from
login but allow su - username.
Expand on the "if" statement if there are multiple accounts.
For Bourne and POSIX shells, add the following to /etc/profile:
name=`logname`
if [ $name = username ]
then
echo $name not allowed to login...only su
exit
fi
#end
For C shell, add the following to /etc/csh.login:
set name=`logname`
if ( $name == username ) then
echo $name not allowed to login...only su
exit
endif
#end
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2001 09:22 AM
02-22-2001 09:22 AM
Re: Restricting user access
We use this during system maintenance as our users never seem to listen to our guidance.
hth,
Ray
# Check for file /etc/nologin. If present, log the users off (system
# maintenance in effect).
if [ -r /etc/nologin ]
then
case `/usr/bin/id -u` in
0|103|101|104|185)
echo "\n\n\n";
echo " --> NOTICE <---";
echo "User login is currently disabled because of system mainten
ance";
echo "However, you will be allowed in.";
echo "\nPress Enter to continue...\c";
read junk;;
*)
sleep 2;
clear;
echo "\n\n\n\n\n\n\n\n";
echo " The system is currently unavailable.";
echo " Please try again later. DPI Helpdesk can be contacted @
4298.";
sleep 5;
exit 1;;