LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 09-04-2006, 01:23 AM   #1
pasupuleti
LQ Newbie
 
Registered: Sep 2006
Posts: 24

Rep: Reputation: 15
Enable and Disable security services(FTP,TELNET,FINGER.....)


How do i enable and disable services like ftp,telnet,finger,rlogin,rsh,xdmcp for different users depending on the user login?i want to do this programmatically.i mean i want to know if there are any commands that can be performed to achieve this.thank u.
 
Old 09-04-2006, 02:17 AM   #2
camh
Member
 
Registered: Feb 2005
Distribution: Slack/Debian
Posts: 163
Blog Entries: 2

Rep: Reputation: 33
are you referring to those commands or the actual servers?
 
Old 09-04-2006, 02:32 AM   #3
pasupuleti
LQ Newbie
 
Registered: Sep 2006
Posts: 24

Original Poster
Rep: Reputation: 15
are you referring to those commands or the actual servers?
 
Old 09-04-2006, 02:36 AM   #4
pasupuleti
LQ Newbie
 
Registered: Sep 2006
Posts: 24

Original Poster
Rep: Reputation: 15
yes,i am referring to the commands coz i want to write code to enable and disable the services.
 
Old 09-04-2006, 03:07 AM   #5
camh
Member
 
Registered: Feb 2005
Distribution: Slack/Debian
Posts: 163
Blog Entries: 2

Rep: Reputation: 33
I would create a group and add your 'allowed' users to it. Then change the perms on the files so that they are executable by that group (ie, remove the Other perms). No code necessary. Just add the users to that group and they should be able to use that program.
 
Old 09-05-2006, 01:28 AM   #6
pasupuleti
LQ Newbie
 
Registered: Sep 2006
Posts: 24

Original Poster
Rep: Reputation: 15
Thank u sir.but can u tell me on which 'files' u want me to change the permissions.
 
Old 09-05-2006, 06:35 AM   #7
Lotharster
Member
 
Registered: Nov 2005
Posts: 144

Rep: Reputation: 18
Quote:
Originally Posted by pasupuleti
Thank u sir.but can u tell me on which 'files' u want me to change the permissions.
That depends on which services you want to disable.

If you want to disable telnet, the command
Code:
$ whereis telnet
will tell you the abolute path of telnet on your machine. Oh my machine it shows:
Code:
/usr/bin/telnet /usr/share/man/man1/telnet.1.gz
The first one is the executable (binary) file, the second one is the manpage.
Code:
$ ls -l /usr/bin/telnet
will list the owner (root), group (probably also root) and the permissions of the file. You should change the group to your special group name (e.g. special) and adjust the permissions so that only the group and root has permission to execute the binary. The commands are (you must have root privileges):
Code:
# chgrp special /usr/bin/telnet
# chown o-x,g+x /usr/bin/telnet
You have to repeat that for every service you want to restrict.
 
Old 09-05-2006, 07:27 AM   #8
pasupuleti
LQ Newbie
 
Registered: Sep 2006
Posts: 24

Original Poster
Rep: Reputation: 15
thank u sir.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Router/Security settings to enable FTP Gamezace Linux - Networking 3 08-18-2006 04:02 PM
How to permanently disable/enable boot-up services for fc5 FireGunz Fedora 11 03-30-2006 06:15 PM
How to enable the ftp, telnet/ssh services in Fedora 4 cyber.juggernaut Linux - Networking 2 02-22-2006 08:30 PM
RedHat 9.0 Firwall setting to enable telnet/ftp sathishc Linux - Networking 1 04-26-2004 12:00 PM
How to remove telnet and finger? daYz Slackware 2 11-14-2003 05:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration