Ask a Question related to Sun Solaris, Design and Development.

  1. #1

    Default rksh


    hi

    i would like to use rksh for some of my users, but dont have a clue how it
    works, the man page is little help

    can anyone tell me how / where you set what commands the users are allowed
    to run while in the restricted shell

    thanks

    al




    al dav Guest

  2. #2

    Default Re: rksh

    al dav wrote:
    > hi
    >
    > i would like to use rksh for some of my users, but dont have a clue how it
    > works, the man page is little help
    Which part of it don't you understand?

    >
    > can anyone tell me how / where you set what commands the users are allowed
    > to run while in the restricted shell
    >

    As the manpage says, in a restricted shell you can't:

    change directory

    set the value of SHELL, ENV, or PATH

    specify path or command names containing /


    These restrictions apply after .profile (and $ENV, if specified) have
    run. So you're restricted to those commands available in the $PATH as
    specified in .profile and $ENV (and /etc/profile, of course).

    You can't specify a command by absolute path so you can't run
    /usr/local/bin/foo/secret-thing unless /usr/local/bin/foo is in your PATH

    You can't change your PATH (so you can't go

    PATH=$PATH:/usr/local/bin/foo
    secret-thing

    And you can't cd, so (assuming the current directory is in the PATH,
    which is probably a Very Bad Idea anyway), you can't

    cd /usr/local/bin/foo
    secret-thing

    --
    Tony






    Tony Walton Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139