- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- how to restrict number of users to telnet/ftp serv...
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
03-31-2004 03:17 PM
03-31-2004 03:17 PM
I have 10 users account on my FTP and telnet servers. I just want to allow 5 users to connect the servers at a time, i.e if 5 users are already connected to the telent/ftp server, then no new connection will be build... what shold I do... help please
I m using rhl 9.
Best Regards
Maaz
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2004 04:27 PM
03-31-2004 04:27 PM
SolutionRestricting the number of telnets is going to be a bit more annoying.
Here's one option.
put somthing like this in /etc/profile
[ `ps -ef | grep -v grep | grep telnet | wc -l` -gt 5 ] && {
echo "maximum nunmber of telnet sessions reached, sorry"
exit;
}
This isn't foolproof but it will get you close.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2004 04:44 PM
03-31-2004 04:44 PM
Re: how to restrict number of users to telnet/ftp servers
Add this to /etc/profile
#Allows the root user always
#Only allows once instance of a user login
user=`whoami`
usercount=`who| grep -v root | wc -l`
userinstances=`who| grep $user |wc -l`
if [ $user != root ]
then
if [ $userinstances -gt 1 ]
then
exit
fi
else
if [ $usercount -gt 7 ]
then
exit
fi
fi
-Karthik S S
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-31-2004 06:59 PM
03-31-2004 06:59 PM
Re: how to restrict number of users to telnet/ftp servers
Edit the file /etc/xinetd.conf and add a line:
instances = 3
if you want to limit the xinetd services up to 3 simultanious logins.
As for the ftp- vsftpd which comes today as the default ftp server is not a part of xinetd services.
For vsftpd (the fedault ftp server in redhat) add a line to /etc/vsftpd/vsftpd.conf
max_clients with a number of maximum clients.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2004 06:37 PM
04-01-2004 06:37 PM
Re: how to restrict number of users to telnet/ftp servers
Big Help.. Mark Grant, Many Thanks
Karthik S S, I just dont how can I give u 100 points, for ur reply. Really Big help. Many Thanks... Thanks a Million
and Alexander.. is always Gr8
Best Regards
Maaz