LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 08-02-2005, 02:44 PM   #1
fiservguy
Member
 
Registered: Nov 2004
Distribution: RHEL 2.1, RHEL 3.0, SUSE 9.2
Posts: 31

Rep: Reputation: 16
FC3 problem with sudo


I'm running Fedora Core 3 on several Dell SX280s. They are single use machines, running a software suite that receives and prints documents.

That part works fine.

On similar RHEL 3 machines, I've edited sudoers to allow non-privileged accounts to restart this software using a simple 3 line script (essentially stop the software, then start 2 separate daemons, all by pointing to executables that are specifically written for these tasks in the /usr/bin directory.) This works fine on RHEL 3.

In Fedora, I get the following error:
sesh: Error execing /usr/scripts/urestart: Exec format error

where /usr/scripts/urestart is the name of my 3 line script.

I've checked sudoers and can't find any errors. I've checked the script and can't find any errors. I can run the script as root with no problems.

I've checked permissions on the script and directory, and they're fine.

I can't find any information on the web on what that sesh: error means.

Any ideas?

fiservguy
 
Old 09-04-2005, 04:02 PM   #2
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Just browsing the "0 reply" threads and saw yours. Since it has been there a while, let me give you a (off-the-wall) suggestion:

I suspect that sesh is the SELinux version of bash, and that you've got SELinux enabled. root is probably in the seusers (see the command) as (perhaps) the only user permitted to change sedoers.

All that being said, I'm really just guessing, and I've never seen the sesh: Error message.

Last edited by PTrenholme; 09-04-2005 at 04:04 PM.
 
1 members found this post helpful.
Old 10-20-2005, 03:46 PM   #3
fiservguy
Member
 
Registered: Nov 2004
Distribution: RHEL 2.1, RHEL 3.0, SUSE 9.2
Posts: 31

Original Poster
Rep: Reputation: 16
(I got sidetracked on other issues, and just came back to this problem)

Your post was more helpful than you may have thought, PTrenholme. The ultimate problem was sloppy script writing on my part.

I didn't have a shell declaration at the beginning of my script. The script was being called by /usr/bin/sesh, and it apparently doesn't understand the simple bash commands I had entered. Adding the shell declaration (#!/bin/bash) solved the problem.

One more error identified and documented in my own little world, several hundred thousand to go...

Thanks for the feedback,
fiservguy
 
1 members found this post helpful.
Old 04-09-2010, 03:19 PM   #4
sanemanmad
LQ Newbie
 
Registered: Mar 2007
Posts: 5

Rep: Reputation: 1
Had similiar issue

I wrote a custom script and just started noticing these errors

sesh: Error execing ./getlastlog.sh: Exec format error

and this is what was causing the issue...

[onhodgdm@myserver 040910]$ cat getlastlog.sh
# Written by %%%%%%% - UNIX Admin
#!/bin/bash

and changed it to
[onhodgdm@myserver 040910]$ cat getlastlog.sh
#!/bin/bash
# Written by %%%%%%% - UNIX Admin

## Problem solved
 
1 members found this post helpful.
Old 01-25-2012, 05:38 PM   #5
barataaway
LQ Newbie
 
Registered: Jan 2012
Location: São Paulo / SP / Brazil
Distribution: Red Hat, Fedora, SuSe, HPUX, Solaris
Posts: 12

Rep: Reputation: Disabled
Quote:
Originally Posted by fiservguy View Post
(I got sidetracked on other issues, and just came back to this problem)

Your post was more helpful than you may have thought, PTrenholme. The ultimate problem was sloppy script writing on my part.

I didn't have a shell declaration at the beginning of my script. The script was being called by /usr/bin/sesh, and it apparently doesn't understand the simple bash commands I had entered. Adding the shell declaration (#!/bin/bash) solved the problem.

One more error identified and documented in my own little world, several hundred thousand to go...

Thanks for the feedback,
fiservguy
Same problem here and this tip really helped me! Thank you very much.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Restricting Editing in Sudo (Advanced Sudo Question) LinuxGeek Linux - Software 4 11-04-2006 03:20 PM
Problem with sudo SwannAnderson Linux - Newbie 5 10-03-2005 07:10 PM
sudo problem drigz Linux - Software 4 06-21-2004 03:46 PM
Problem with sudo punx120 Linux - Software 0 05-08-2004 10:43 AM
sudo - problem with cmnd_alias slackware stu Linux - Software 0 10-04-2003 12:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 11:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration