using sudo with nohup
Lehr Karen
karen.lehr at siemens.com
Wed Jul 16 13:22:30 EDT 2003
Thanks. I did some testing and figured out that the problem was caused more
by the "&" than the nohup. Since the script that's in question is a backup,
I changed this in the sudoers to not ask for a password.
-----Original Message-----
From: Ladner, Eric (Eric.Ladner) [mailto:Eric.Ladner at chevrontexaco.com]
Sent: Wednesday, July 16, 2003 1:11 PM
To: Lehr Karen; sudo-users at sudo.ws
Subject: RE: using sudo with nohup
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.
E
-----Original Message-----
From: Lehr Karen [mailto:karen.lehr at siemens.com]
Sent: Wednesday, July 16, 2003 09:13
To: 'sudo-users at sudo.ws'
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 sudo.ws>
For list information, options, or to unsubscribe, visit:
http://www.sudo.ws/mailman/listinfo/sudo-users
More information about the sudo-users
mailing list