Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

crontab error 236 1

Status
Not open for further replies.

wpdavids

IS-IT--Management
Jan 31, 2001
60
US
When I "su" to a user's ID and try to edit their crontab file with "crontab -e" I get what looks like an error with a code of 236. When I press enter I just keep getting question marks. I then type "q" which ends up being the only command it will accept, which then exits the editing session.

example:

$ crontab -e
236

?

?
q

Has someone ever seen this type of an error and have a resolution for it. Please help I need to setup users with crontab access.
 
su user
or
su - user
this is here the question ?

makes a difference :)
but might not be the problem :-(

matt
 
Yes.. I am using "su - username" from the root account or a direct logon to the user account. Then I would try to edit corontab. I still get the same problem with either logon method.
 
You're in the [tt]ed[/tt] editor. That 236 is how many lines were read. Since no [tt]EDITOR[/tt] enviropnment variable has been defined, it's defaulting to [tt]ed[/tt].

Either...
[tt]
EDITOR=vi
crontab -e
[/tt]
...or learn the commands for [tt]ed[/tt]. The man pages should give you enough to get along.

Hope this helps.

 
Thanks, you are the best.. I would have been spinning wheels for a while figuring this simple problem. I never saw anyone use the "ed" editor before.
 
Well, this is unix. Sometimes the simplest problems cause the most grief. The only reason I knew this one is because I've bumped my nose on it myself!!! [bigsmile]



 
I added the following lines to /etc/profile so all users will be using vi on crontab and so on.....

# Set backsace key to erase
stty erase "^H"

# Default for all users
EDITOR=vi
export EDITOR

HOST=`uname -n`
PS1="$HOST $LOGNAME : "
export PS1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top