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 - 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, 01: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, 03:06 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

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


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 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 11:25 AM
running SHell script from java anirudh Programming 2 01-07-2005 07:37 AM
Running shell script install, how? henrikanttonen Linux - Newbie 9 08-06-2004 08:46 PM
c/c++ running a shell script? thermalpants Programming 3 05-12-2002 11:41 AM
Running a shell script when a user is added. jayakrishnan Linux - General 5 04-29-2002 02:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 11:18 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