HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: restrict the services
Operating System - HP-UX
1825768
Members
3308
Online
109687
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
06-19-2009 11:21 AM
06-19-2009 11:21 AM
restrict the services
how to restrict the specific user for using telnet and ftp and ssh.. please let me know .. Maximum points assured
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2009 12:37 PM
06-19-2009 12:37 PM
Re: restrict the services
OS does not provide this functionality on username basis. You can use /var/adm/inetd.sec to limit users coming from IP addresses or ranges and what they can and can't do, just look at the examples in the file.
If you are keen on limiting on username basis, you need to develop a script logic, put it in the user's .profile and do not let them edit their own .profile (not a good idea) or put this in /etc/profile and check all users while logging in.
A last note, as a courtesy to the people contributing their valuable time to help you and likes of you, dangling points is not a very nice way to solicit help and may backfire. You may get plenty of responses from point hunters but not from the people who can give you the right answers in a way that you can understand. Do assign points to answers you receive according to their value but do not expect this to be a motivation factor for everyone. So far, what I have seen your earlier threads, your point assignments did not get you too many brownie points. So, if I were you I'd do an attitude adjustment. DO not take this as criticism but a friendly advice.
If you are keen on limiting on username basis, you need to develop a script logic, put it in the user's .profile and do not let them edit their own .profile (not a good idea) or put this in /etc/profile and check all users while logging in.
A last note, as a courtesy to the people contributing their valuable time to help you and likes of you, dangling points is not a very nice way to solicit help and may backfire. You may get plenty of responses from point hunters but not from the people who can give you the right answers in a way that you can understand. Do assign points to answers you receive according to their value but do not expect this to be a motivation factor for everyone. So far, what I have seen your earlier threads, your point assignments did not get you too many brownie points. So, if I were you I'd do an attitude adjustment. DO not take this as criticism but a friendly advice.
________________________________
UNIX because I majored in cryptology...
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-21-2009 09:48 PM
06-21-2009 09:48 PM
Re: restrict the services
Hi Gany,
1. If you want to block the ftp for root.
Edit the file "/etc/ftpd/ftpusers" and add root in this file to block ftp from root on the server.
2. Disable telnet for root.
Edit the file below.
# cat /etc/securetty
console
That will prevent root logging in directly from anywhere but the console. It will allow you to log in via telnet as a regular user and, if you know the root password, do a 'su -' to get to root.
3.Edit the sshd_config
vi /etc/ssh/sshd_config or /usr/local/etc/openssh/sshd_config
# To allow only certain users >> Allows only user1 and user2 to login via SSH
AllowUsers user1 user2 user3
# To block certain users >> Blocks only user5 and user6
DenyUsers user5 user6
Regards
Vivek
1. If you want to block the ftp for root.
Edit the file "/etc/ftpd/ftpusers" and add root in this file to block ftp from root on the server.
2. Disable telnet for root.
Edit the file below.
# cat /etc/securetty
console
That will prevent root logging in directly from anywhere but the console. It will allow you to log in via telnet as a regular user and, if you know the root password, do a 'su -' to get to root.
3.Edit the sshd_config
vi /etc/ssh/sshd_config or /usr/local/etc/openssh/sshd_config
# To allow only certain users >> Allows only user1 and user2 to login via SSH
AllowUsers user1 user2 user3
# To block certain users >> Blocks only user5 and user6
DenyUsers user5 user6
Regards
Vivek
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
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP