Find the answer to your Linux question:
Results 1 to 2 of 2
I have a user, and I want him to be able to run exactly one command when he logs in. The command is under /usr/bin. It is called by a ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2009
    Posts
    3

    Restricted Shell


    I have a user, and I want him to be able to run exactly one command when he logs in. The command is under /usr/bin. It is called by a script on a remote system, so I cannot link it or change the command name. bash -r would be perfect, but I can't execute commands with slashes in them. I cannot change the way the command is called. So, my user needs to execute /usr/bin/<command> and absolutely nothing else. Any ideas how I can make this happen using bash?

    Thanks in advance!

  2. #2
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    877
    Welcome to the forums!

    http://www.linux1.ca/downloads/restricted_env.txt

    Hope this will help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •