Gentoo Archives: gentoo-user-ru

From: alexey <alexey@×××××.ru>
To: gentoo-user-ru@l.g.o
Subject: Re: [gentoo-user-ru] Проблема с su
Date: Sun, 20 Nov 2005 21:48:23
Message-Id: 4380EEFD.60300@mitme.ru
In Reply to: [gentoo-user-ru] Проблема с su by Maxim Ivanov
1 Maxim Ivanov wrote:
2
3 >÷Ï ×ÓÅÈ ÄÏËÁÈ ÐÉÛÅÔÓÑ, ÞÔÏ ÐÏÄ root ÓÉÄÅÔØ ÎÅÌØÚÑ, É ÁËÔÉ×ÎÏ ÒÅËÌÁÍÉÒÕÅÔÓÑ
4 >ÕÔÉÌÉÔËÁ su - ÍÏÌ ÓÉÄÉÔÅ ÐÏÄ wheel, Á ÅÓÌÉ ÞÔÏ ÔÏ ÏÔ ÁÄÍÉÎÁ ×ÙÐÏÌÎÉÔÅ ËÏÍÁÎÄÕ.
5 >÷ÏÔ ÐÒÉÍÅÒ:
6 >baron@proxy1 / $ su root ls
7 >Password:
8 >/bin/ls: /bin/ls: cannot execute binary file
9 >
10 >é ÔÁË Ó ÌÀÂÏÊ ËÏÍÍÁÎÄÏÊ. ÷ ÞÅÍ ÇÒÁÂÌÉ?
11 >
12 >
13 >
14 ÍÎÏÊ ÚÁÍÅÞÅÎÏ ÞÔÏ ÐÒÉ ÔÁËÏÍ ÓÉÎÔÁËÓÉÓÅ ËÁË
15 su root ls
16 (ËÏÇÄÁ ls ÉÌÉ ÉÎÁÑ ËÏÍÁÎÄÁ ÞÉÓÌÙÊ ELF) ÄÅÊÓÔ×ÉÔÅÌØÎÏ ÂÕÄÅÔ ÓÅÂÑ ×ÅÓÔÉ ÔÁË
17 ÍÏÖÎÏ ÐÉÓÁÔØ
18 su root -c ls
19 ÌÉÂÏ ÉÓÐÏÌØÚÏ×ÁÔØ BASH-ÓËÒÉÐÔ Ï£ÒÔËÕ × Ä×Å ÓÔÒÏËÉ
20
21 === /bin/ls_script ========= begin
22 #!/usr/bin/env bash
23 /bin/ls
24 ===================== end
25 ÐÏÓÔÁ×ÉÔØ ÎÁ ÎÅÇÏ chmod +x /bin/ls_script
26
27 É ÐÉÓÁÔØ
28 su root ls_script
29
30 ×ÏÔ ÔÁËÁÑ ÇÒÁÂÌÑ. ÌÉÂÏ sudo ÄÅÊÓÔ×ÉÔÅÌØÎÏ ÀÚÁÔØ.
31 ÓÁÍ ÎÅÄÁ×ÎÏ ÎÁÐÏÒÏÌÓÑ ÐÒÉ ÏÂÒÁÔÎÏÊ ÚÁÄÁÞÅ ÉÚ /etc/init.d-ÓËÒÉÐÔÁ
32
33 . /etc/profile
34 start)
35 ...
36 su - oracle $ORACLE_HOME/bin/lsnrctl start
37 ...
38
39 Ô×ÁÒÀÇÁ lsnrctl ÔÏÇÄÁ ÔÏÖÅ ÐÉÓÁÌÁ cannot execute binary file
40 ÈÏÔÑ ÜÔÏ ÐÏÄÓÔÁ×Á. × man ÒÁÚÎÉÃÁ ÄÁÌÅËÏ ÎÅ ÏÞÅ×ÉÄÎÁ
41
42 su [-] [username [ args ]]
43
44 Additional arguments may be provided after the username, in which case
45 they are supplied to the user's
46 login shell. In particular, an argument of -c will cause the next
47 argument to be treated as a command by
48 most command interpreters. The command will be executed by the shell
49 specified in /etc/passwd for the
50 target user.
51
52 ... ×ÏÔ ÔÁË É ÖÉ×£Í.
53
54 --
55 Ne dites rien, les mots sont superflus...
56
57
58 --
59 gentoo-user-ru@g.o mailing list