using sudo with nohup

Ladner, Eric (Eric.Ladner) Eric.Ladner at
Wed Jul 16 13:10:49 EDT 2003

Nohup detatches from the current process and you get a process that's
suspended in the background waiting for input on a detached channel
(HP-UX says "Stopped (tty output)" and the only thing you can do then is
kill it)

Here's a dirty workaround:

$ sudo date
# Date executes and the password is cached for a few minutes.
$ nohup sudo some_script &
# Executes without asking for a password, since it's cached.


-----Original Message-----
From: Lehr Karen [mailto:karen.lehr at] 
Sent: Wednesday, July 16, 2003 09:13
To: 'sudo-users at'
Subject: using sudo with nohup

Hello, I'm having trouble using sudo with nohup and &.  I issue command:
script_name nohup & A PID returned, then the password prompt.  When I
type in the password, it shows on the screen.  After password is typed
and I hit enter, the job is cancelled.  
sudo-users mailing list <sudo-users at>
For list information, options, or to unsubscribe, visit:

More information about the sudo-users mailing list