LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 03-20-2014, 10:33 AM   #1
amit.kanade1983
Member
 
Registered: May 2012
Location: India
Distribution: CentOS,RedHat
Posts: 41

Rep: Reputation: 1
sudo : removing rights to run all commands for a particular user


Hi,
I am trying to add a user on a server that can only run telnet command and cannot run any other command that by default a normal user on linux is able to run. Is that possible???
 
Old 03-20-2014, 02:57 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,621

Rep: Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963
Quote:
Originally Posted by amit.kanade1983 View Post
Hi,
I am trying to add a user on a server that can only run telnet command and cannot run any other command that by default a normal user on linux is able to run. Is that possible???
Possible? Yes, and totally pointless. The telnet client can invoke a sub-shell, which will then be able to run other commands. The only good way to do this is to set the users login shell to be /bin/telnet (or wherever you keep telnet on your system), but see previous comment. And in order to invoke sudo, you must first log in to a shell, which will NEED to run other commands in order to log in.

What is your goal? What are you trying to accomplish? Version/distro of Linux? And WHY, in 2014 are you even CONSIDERING using telnet??? Telnet was old and insecure ten years ago...it hasn't improved.
 
  


Reply



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
Setting up user to use sudo for specific commands kreed Linux - Newbie 6 05-16-2011 04:43 PM
[SOLVED] "sudo: Can't mkdir /var/run/sudo/%user%: File exists" CNBarnes Linux - Server 7 01-10-2011 04:11 PM
[SOLVED] Sudo problem - Run all commands with password except these uncle-c Linux - Newbie 1 02-16-2010 11:02 AM
Displayign what user is running sudo commands jakev383 Linux - Security 1 08-04-2009 03:01 PM
sudo: I can't get it to run multiple commands. example within... s2cuts Linux - General 3 03-05-2008 09:07 PM

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

All times are GMT -5. The time now is 09:29 AM.

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