[PLUG] Dumb script question
John Jason Jordan
johnxj at comcast.net
Mon Apr 19 04:44:45 UTC 2010
On Sun, 18 Apr 2010 20:24:15 -0700
John Jason Jordan <johnxj at comcast.net> dijo:
>On Sun, 18 Apr 2010 20:16:46 -0700
>wes <plug at the-wes.com> dijo:
>
>>how do you "change to root" ? I'm betting it's with sudo su rather
>>than just su. When you use sudo, it asks for jjj's password instead of
>>root's.
>>
>>There are 2 solutions available: change your script to use sudo in
>>front, or just have the commands run as root automatically on a
>>schedule via cron.
>
>Thanks for the heads up. Of course sudo su uses jjj's password, and I
>must have done that, although I could swear I used just su. I say that
>I must have done that because just now I tried su and got an
>authentication error. I suspect there is no root password set on the
>computer. I think Ubuntu does not set a root password by default.
>
>And, after thinking about it, the cron approach sounds simpler. I could
>set it to run just once a month, which would be sufficient to keep the
>clock reasonably current.
>
>Off to figure out cron.
After an hour of trying to make sense of cron I gave up. I'm sure it's
an amazing tool that will do wonderful things, but I don't need to do
wonderful things.
I installed gnome-schedule, which appears to be a GUI front end for
cron. Unfortunately, the documentation does not match the application
and there appears to be no way to run a command with it as root or as
superuser.
So I edited my script and put sudo in front of both commands, made a
gnome-panel icon to launch it in a terminal, and it is working fine.
I'll run it whenever I notice the clock doesn't match my watch by
enough to care about.
More information about the PLUG
mailing list