Pagina 1 di 1

Sudo

Inviato: mar 19 lug 2005, 1:47
da DarkNeo
Salve stavo cercando di dare i permessi al mio utente affinche possa usare il comando nohup in /etc/sudoers ho provato ad aggiungere questa riga ma non ha funzionato:

Codice: Seleziona tutto

# sudoers file.
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the sudoers man page for the details on how to write a sudoers file.
#

# Host alias specification

# User alias specification

# Cmnd alias specification

# Defaults specification

# Runas alias specification

# User privilege specification
root    ALL=(ALL) ALL

# Uncomment to allow people in group wheel to run all commands
# %wheel        ALL=(ALL)       ALL

# Same thing without a password
# %wheel        ALL=(ALL)       NOPASSWD: ALL

# Samples
 %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
 %users  localhost=/sbin/shutdown -h now
%users ALL=/usr/bin/nohup
ma non ha funzionato :?

Inviato: mar 19 lug 2005, 2:26
da gallows
prova con:

Codice: Seleziona tutto

%users ALL=(ALL) NOPASSWD: /usr/bin/nohup

Inviato: mar 19 lug 2005, 2:43
da DarkNeo
non funge:

Codice: Seleziona tutto

bash-3.00$ nouhp amsn&
bash: nouhp: command not found
[1] 3543
[1]   Exit 127                nouhp amsn

Inviato: mar 19 lug 2005, 3:02
da gallows
DarkNeo ha scritto:non funge:

Codice: Seleziona tutto

bash-3.00$ nouhp amsn&
bash: nouhp: command not found
[1] 3543
[1]   Exit 127                nouhp amsn
è nohup NON nouhp!
comunque se vuoi avere i privilegi di root devi aggiungere sudo:

Codice: Seleziona tutto

$ sudo nohup amsn&

Inviato: mar 19 lug 2005, 3:09
da gallows
curiositá: perché lo vuoi eseguire come root?

edit: avevo aggiunto una ca**ata ;)

Inviato: mar 19 lug 2005, 3:12
da DarkNeo
Mancava il sudo :? in che senso lo voglio eseguire come root? Uso spesso nohup per poter chiudere la shell dopo aver lanciato il programma, da utente nohup non lo posso lanciare e quindi ho usato sudo.

Inviato: mar 19 lug 2005, 3:16
da gallows
strano, da utente normale funziona nohup... che errore ti da?
comunque se ti serve per poi poter sloggarti esiste anche "screen"

Inviato: mar 19 lug 2005, 13:55
da DarkNeo
A me dava permission denied :?