login as www user?
August 19, 2008 4:26 PM   Subscribe

How do I log in as www? I am running a bunch of scripts on my webserver/svn server, but they are having some problems, so as a troubleshooting measure, I would like to log in as the user so I can test scripts and other random things.

I know www is a non-login user, but I am seeing things that are happening that don't happen as other users. I know it is probably an issue with enviro vars that the www doesn't have, but I am unsure as to how to test it further without logging in.
posted by brent_h to Computers & Internet (7 answers total)
 
sudo su www -
posted by moift at 4:34 PM on August 19, 2008


Assuming Linux,

ssh in, sudo/su to root, then 'su - www -s /bin/sh'

(Many installations have /bin/true set to the shell, so -s /bin/sh may be necessary.)
posted by theclaw at 4:34 PM on August 19, 2008


On Windows, either runas at a command line or shift-right click on icons.
posted by wongcorgi at 4:37 PM on August 19, 2008


Personally once i either ssh in as root or su up i use login -f www.

f means dont prompt for a password
posted by DJWeezy at 4:07 PM on August 20, 2008


Response by poster: this is actually on osx 10.5 server, and none of these things are working.
posted by brent_h at 10:35 PM on August 20, 2008


Best answer: brent_h,

I talked to a coworker who works with OSX server, and he said to set a password on the account (passwd www), then just "su www" as a regular user which will prompt you for a password.

You should also verify that www is the user that the web server runs as.
posted by theclaw at 10:30 AM on August 21, 2008


Best answer: thanks theclaw. This worked, but only after I did a chsh for _www ( not sure why leopard is now putting underscored before system users). The default shell is /usr/bin/false, so changing that to bash or whatever, was the first thing, then changing the passwd. thanks everyone
posted by brent_h at 9:55 PM on August 21, 2008


« Older How do I take a roadtrip with a guy who is...   |   Fogster's "Navigating the MBTA: Prudential Tower... Newer »
This thread is closed to new comments.