Brian Candler wrote: > On Tue, May 01, 2007 at 04:48:37AM +0900, John Clisham wrote: >> is running under. >> >> Is this possible? Any ideas? > > The user will authenticate by providing their OS username and password? > > Perhaps you could use PTY.spawn and run 'su - username' Yes, I will authenticate useing their OS username and password. I haven't used PTY.spawn before. Does it just spawn off a new psuedo terminal? After doing a 'su -username' and authenicating; I want to execute a block of ruby code as that user. Ideally that block would return a ruby object that I could then manipulate in the broader app. (ie since this is a Rails app, I would execute controller code as the authenticated user (ie to get job files); and use one set of views for all users. Am I making sense or over thinking this? Basically, I'm trying to avoid calling everything in shell's and reading in stdout. I'm trying to stay completely in Ruby here. THanks! KF -- Posted via http://www.ruby-forum.com/.