LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 04-24-2004, 02:36 PM   #1
sschueller
LQ Newbie
 
Registered: Feb 2003
Posts: 7

Rep: Reputation: 0
Running script as user that does not have shell


I'm trying to run a script that converts mbox to maildir. The sript needs to be run as the user that I'm converting the mailbox but all my users except for a few do not have shell access.

When I do "su user -c "script" as root it doesn't work. It only works if the user has shell like /bin/bash.

Is it even possible to run commands as users that don't have shell access? In my case they all have /bin/false.

thanks

-Stefan
 
Old 04-24-2004, 04:06 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Try invoking a new shell:
su - user -c "script"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
running a program from shell script Suinatsa Programming 10 04-14-2005 12:25 PM
running SHell script from java anirudh Programming 2 01-07-2005 08:37 AM
Running shell script install, how? henrikanttonen Linux - Newbie 9 08-06-2004 09:46 PM
c/c++ running a shell script? thermalpants Programming 3 05-12-2002 12:41 PM
Running a shell script when a user is added. jayakrishnan Linux - General 5 04-29-2002 03:55 AM


All times are GMT -5. The time now is 04:42 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration