Přidat otázku mezi oblíbenéZasílat nové odpovědi e-mailem su - automaticke zadanie hesla

linuxaci, potrebujem od vas pomoc. napisal som flegovi script na ziskanie jeho strateneho rootovskeho hesla, ale neviem urobit jednu banalnu vec. chcem zadat priamo su heslo ako jeden prikaz a nie najprv su a potom heslo, ako sa to robi standardne. skusal som to robit cez pipe: echo heslo | su a aj pomocou suboru su < password.file, ale bez vysledku. vie niekto poradit ako nato, nie som moc linux guru?

Jsou zobrazeny jen nové odpovědi. Zobrazit všechny
Předmět Autor Datum
skusal som tam dostat ten expect. bohuzial potreboval tcl. tcl standardne neslo instalnut tak som ho…
fleg 22.03.2006 09:30
fleg
Myslím, že těmi CFLAGS jsi do toho vnesl trošku chaos, ale nebyl to hlavní problém. Spíše to chtělo…
michich 22.03.2006 10:30
michich
tak som to cele prekompiloval a nasiel si v instalacke! (rozbalenej) ten subor...po skopceni prebehn…
fleg 22.03.2006 10:47
fleg
Tcl zrejme pri "make install" nenainstalovalo vsechny hlavickove soubory. Zkus jeste navic "make ins…
michich 22.03.2006 11:17
michich
nie nie v tom to nebude...aj ked pre istotu som to skusil. tu mas pre istotu cely chybovy vypis. exp…
fleg 22.03.2006 11:46
fleg
Tak jsem si to schvalne zkusil. Muj postup: Stahnul jsem tcl8.4.12-src.tar.gz a expect.tar.gz rozbal…
michich 22.03.2006 23:47
michich
ja som nemal na konci --prefix...z neznamych pricin poslední
fleg 23.03.2006 00:49
fleg

skusal som tam dostat ten expect. bohuzial potreboval tcl. tcl standardne neslo instalnut tak som ho skusil picnut to homediru. tam sa mi to podarilo cez ./configure --prefix=~/opt ale expect pri instalacii najprv hladal jednu kniznicu. to som vyriesil cez CFLAGS='-L/home/fleg/opt/lib/' ./configure --with-tcl=/home/fleg/opt/lib/ ale skoncil som na chybe ze hladal nejaky header (checking for Tcl private headers... checking for tclInt.h... no
configure: error: Can't find Tcl private headers). po googleni som zistil ze problem je asi vo verziach tcl8.4 vs 8.3 tak som sa na to cele vykaslal a skusil ist cestou perlovskeho expect (8.4 uz teno header vobec nema).
otazka znie ci perlovsky modul funguje aj bez nainstalovaneho klasickeho pripadne preco zlyhali moje pokusy;o)

tak som to cele prekompiloval a nasiel si v instalacke! (rozbalenej) ten subor...po skopceni prebehne configure ok ale make uz nie.
len namatkovo
expect_comm.h:59: error: syntax error before "char"
expect_comm.h:62: error: syntax error before "int"
In file included from exp_main_exp.c:13:
expect_tcl.h:25: error: syntax error before "int"
expect_tcl.h:26: error: syntax error before "int"
.....
......
skusal som configure aj bez CFLAGS prebehne tiez ok ale zastavi ma make

nie nie v tom to nebude...aj ked pre istotu som to skusil. tu mas pre istotu cely chybovy vypis.
exp_main_exp.c:12:17: tcl.h: No such file or directory
In file included from expect_tcl.h:15,
from exp_main_exp.c:13:
expect_comm.h:59: error: syntax error before "char"
expect_comm.h:62: error: syntax error before "int"
In file included from exp_main_exp.c:13:
expect_tcl.h:25: error: syntax error before "int"
expect_tcl.h:26: error: syntax error before "int"
expect_tcl.h:27: error: syntax error before "FILE"
expect_tcl.h:28: error: syntax error before "char"
expect_tcl.h:29: error: syntax error before "int"
expect_tcl.h:30: error: syntax error before "int"
expect_tcl.h:32: error: syntax error before "int"
expect_tcl.h:34: error: syntax error before "Tcl_Interp"
expect_tcl.h:34: warning: data definition has no type or storage class
expect_tcl.h:37: error: syntax error before "int"
expect_tcl.h:38: error: syntax error before "void"
expect_tcl.h:39: error: syntax error before "int"
expect_tcl.h:40: error: syntax error before "int"
expect_tcl.h:41: error: syntax error before "int"
expect_tcl.h:42: error: syntax error before "void"
expect_tcl.h:44: error: syntax error before "char"
expect_tcl.h:44: error: syntax error before "_ANSI_ARGS_"
expect_tcl.h:46: error: syntax error before "void"

Tak jsem si to schvalne zkusil. Muj postup:
Stahnul jsem tcl8.4.12-src.tar.gz a expect.tar.gz rozbalil je. Napred jsem nainstaloval Tcl:

cd tcl8.4.12/unix
sed -i -e "s/relid'/relid/" configure
# byla v nem totiz syntakticka chyba
./configure --prefix=/home/michich/opt
make
make install
make install-private-headers

Pak jsem nainstaloval expect:

cd ../../expect-5.43
./configure --with-tcl=/home/michich/opt/lib --with-tclinclude=/home/michich/opt/include --prefix=/home/michich/opt
make
make install

Zpět do poradny Odpovědět na původní otázku Nahoru