Pagina 1 di 1
[RISOLTO] HELP sudo command not found
Inviato: domenica 10 gennaio 2010, 2:20
da eaghezzi
stranamente alcune volte sudo non accetta comandi standard e non c'e verso di farlo andare, il comando e' corretto
suggerimenti ?
ipotesi ?
adriano@adriano:/var/log$ sudo cd squid/
sudo: cd: command not found
grazie, ciao.
Re: HELP sudo command not found
Inviato: domenica 10 gennaio 2010, 2:27
da dadexix86
Il comando non è corretto... Perché con sudo non puoi usare il comando cd...
Dal manuale di sudo:
Codice: Seleziona tutto
EXAMPLES
Note: the following examples assume suitable sudoers(5) entries.
[...]
Note that this runs the commands in a sub-shell to make the cd and file
redirection work.
$ sudo sh -c "cd /home ; du -s * | sort -rn > USAGE"
[...]
CAVEATS
There is no easy way to prevent a user from gaining a root shell if
that user is allowed to run arbitrary commands via sudo. Also, many
programs (such as editors) allow the user to run commands via shell
escapes, thus avoiding sudo's checks. However, on most systems it is
possible to prevent shell escapes with sudo's noexec functionality.
See the sudoers(5) manual for details.
It is not meaningful to run the cd command directly via sudo, e.g.,
$ sudo cd /usr/local/protected
since when the command exits the parent process (your shell) will still
be the same. Please see the EXAMPLES section for more information.
[...]
Vuol dire che è inutile fare
perché poi una volta che sei nella cartella non puoi starci perché non hai i permessi

Re: HELP sudo command not found
Inviato: domenica 10 gennaio 2010, 12:54
da eaghezzi
grazie, pensavo che nell'implementazione ubuntu di sudo tutti i comandi interni fossero implementati.
Re: HELP sudo command not found
Inviato: domenica 10 gennaio 2010, 13:09
da dadexix86
Prego
Metti [Risolto] nel titolo del primo post...
Re: [RISOLTO-manca dettaglio spiegazione]HELP sudo command not found
Inviato: lunedì 17 ottobre 2011, 14:46
da nogix
>>Vuol dire che è inutile fare
>>perché poi una volta che sei nella cartella non puoi starci perché non hai i permessi
?????? perchè non dovresti avere i permessi? sudo non dovrebbe renderti superuser e quindi darti accesso a OGNI cartelle, configurazioni strane a parte??? Potresti essere un po' più chiaro? io ricordo di essere sempre entrato in /etc o altre cartelle di proprietà di root proprio grazie a sudo... Come farei altrimenti a entrare in codeste cartelle da terminale?
Ciao e grazie