HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Disabling/Enabling FTP/ Telnet for specific user.
Operating System - HP-UX
1833827
Members
2300
Online
110063
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
04-19-2006 03:56 PM
04-19-2006 03:56 PM
Disabling/Enabling FTP/ Telnet for specific user.
Hi experts,
How can one selectively enable or disable FTP or Telnet sessions for specific users?
How can one selectively enable or disable FTP or Telnet sessions for specific users?
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2006 04:24 PM
04-19-2006 04:24 PM
Re: Disabling/Enabling FTP/ Telnet for specific user.
For disableing ftp for certain users, add their user names to /etc/ftpd/ftpusers file.
man ftpusers for details.
For diabling telnet, add following code to /etc/profile OR make use of TCP wrappers. (If you have hp-ux's ssh, then tcp wrappers comes in built with it.)
if [ $LOGNAME -eq "user1" -o $LOGNAME -eq "user2" ];then
echo "Telnet Not allowed for you"
exit 1
else
echo "Telnet OK
fi
man ftpusers for details.
For diabling telnet, add following code to /etc/profile OR make use of TCP wrappers. (If you have hp-ux's ssh, then tcp wrappers comes in built with it.)
if [ $LOGNAME -eq "user1" -o $LOGNAME -eq "user2" ];then
echo "Telnet Not allowed for you"
exit 1
else
echo "Telnet OK
fi
There is no substitute to HARDWORK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2006 04:47 PM
04-19-2006 04:47 PM
Re: Disabling/Enabling FTP/ Telnet for specific user.
Hi Sathyas,
If tou want user can telnet only (can not ftp), add username on /etc/ftpd/ftpusers; if ftpusers file does not exist create this first.
If you eant user can ftp only (can not telnet),
1. check to see if you have the file /etc/shells
a) If you have, edited the file and add
/bin/false
b) If not do
ls /bin/*sh > /etc/shells then add the /bin/false line
2. create the user for example
# useradd -c "FTP Only User" -d /home/ftpfiles -m -s /bin/false -g staff "username"
or change existing user shells to /bin/false
Doing this by editing /etc/passwd or via command :
# usermod -s /bin/false "username"
Hope this help.
Thanks,
If tou want user can telnet only (can not ftp), add username on /etc/ftpd/ftpusers; if ftpusers file does not exist create this first.
If you eant user can ftp only (can not telnet),
1. check to see if you have the file /etc/shells
a) If you have, edited the file and add
/bin/false
b) If not do
ls /bin/*sh > /etc/shells then add the /bin/false line
2. create the user for example
# useradd -c "FTP Only User" -d /home/ftpfiles -m -s /bin/false -g staff "username"
or change existing user shells to /bin/false
Doing this by editing /etc/passwd or via command :
# usermod -s /bin/false "username"
Hope this help.
Thanks,
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