Linux за българи: Форуми

Linux секция за начинаещи => Настройка на програми => Темата е започната от: Cnupo в Jan 25, 2004, 22:15



Титла: Shell?
Публикувано от: Cnupo в Jan 25, 2004, 22:15
Ne sym mnogo ubeden che mqstoto na tazi tema e tuk, no ne namerix po-podhodqshto. Ta vyprosa mi e, ako iskam da puskam shells (shell server...nz dali moga da go nareka taka) kakyv software mi e nujen za da predotvratq ot zloopotreba sys sistemata i izobshto kakyv software bi mi bil nujen za celta?


Титла: Shell?
Публикувано от: PAIN1 в Jan 25, 2004, 22:27
Не съм сигурен какво изкаш ,какви злоопотреби ? може да ограничиш достъпа насера който ще влезе през този шел .......
По-подробно ако кажеш ?


Титла: Shell?
Публикувано от: CaBA в Jan 26, 2004, 12:44
за bash например -
RESTRICTED SHELL
If  bash  is  started  with  the  name rbash, or the -r option is supplied at invocation, the shell becomes restricted.  A restricted shell is used to set up an environment more controlled  than  the standard  shell.   It  behaves identically to bash with the exception that the following are disallowed or not performed:
       ·      changing directories with cd
       ·      setting or unsetting the values of SHELL, PATH, ENV, or BASH_ENV
       ·      specifying command names containing /
       ·      specifying a file name containing a / as an argument to the .  builtin command
       ·      Specifying a filename containing a slash as an argument to the -p option to the hash builtin  command
       ·      importing function definitions from the shell environment at startup
       ·      parsing the value of SHELLOPTS from the shell environment at startup
       ·      redirecting output using the >, >|, <>, >&, &>, and >> redirection operators
       ·      using the exec builtin command to replace the shell with another command
       ·      adding or deleting builtin commands with the -f and -d options to the enable builtin command
       ·      Using the enable builtin command to enable disabled shell builtins
       ·      specifying the -p option to the command builtin command
       ·      turning off restricted mode with set +r or set +o restricted.
       These restrictions are enforced after any startup files are read.
       When a command that is found to be a shell script is executed (see COMMAND EXECUTION above),  rbash turns off any restrictions in the shell spawned to execute the script.


Титла: Shell?
Публикувано от: Cnupo в Feb 04, 2004, 22:35
Имам предвид ако можете (ако ви се обяснява) да ми обясните как да пусна шел на някого и как да огранича командите, който може да изпълнява :)


Титла: Shell?
Публикувано от: CaBA в Feb 05, 2004, 11:23
Това, което те съветвам, не съм го пробвал, но можеш да опиташ - махаш достъпа на others на /bin и /usr директориите (и на други поддиректории на /, ако в тях има изпълними програми), създаваш група nonrestricted например и правиш /bin  и /usr да са от тази група и се добавяш себе си в тази група, за да можеш да изпълняваш  команди. После правиш /binrestr директория и слагаш там командите, които искаш да изпълнява твоя потребител, слагаш му я в пътя и тестваш. Разбира се, това може да те предпази само от добри хора, за да не те рутнат трябва да попрочетеш това-онова.


Титла: Shell?
Публикувано от: CaBA в Feb 05, 2004, 11:27
А, и още нещо - в никакъв случай не давай на потребителя ти достъп до компилатора и до друг интерпретатор, дадеш ли му, все едно си събуваш гащите, щото той може да си компилира програми, които ти не искаш да изпълнява.


Титла: Shell?
Публикувано от: SGM в Feb 06, 2004, 00:57
Ако дистрибуцията ти работи с PAM (май всички освен slackware работят с PAM) можеш да използваш pam_chroot модула. В този случай обаче ще трябва да правиш за всеки потребител директории и да му добавяш програми, които да изпълнява, с което потребителите ти ще използват повече място на диска...

Поздрави
С.