SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I tried that, and other variations I can think of either stop it from working or make no difference, still being run as root.
Don't see why username should make any difference, as long as it IS a valid user.
It does run the app, so it must be a valid username, seems the problem of root instead of user is elsewhere.
I think the problem is here " $tor_user (you need to define it in your script) refers to the user you want to run tor."
I've created a new user, but how do I define it in the script? Just writing $user1 in place of $tor_user didn't do it.
You don't even need to export it. Using the above example, somewhere near the top of your script just put:
tor_user=bob
With my perverse sense of humor, I created a user called onion. In that case you would say:
tor_user=onion
Without such a definition, the su command just changed to another login of root which is why you got that warning. BTW, if you test the script manually, make sure you invoke it while you are root.
EDIT: The above assumes you leave the command as I wrote it. If you want to put the user's name in that line, you don't need commands like the above, but you also should not put a dollar sign in front of the user's name. The dollar sign tells bash that you are referring to a variable.
Last edited by blackhole54; 01-13-2007 at 03:27 AM.
Sorry, I didn't see your last post when I posted #18 ...
Quote:
Originally Posted by WilliamS
I tried that, and other variations I can think of either stop it from working or make no difference, still being run as root.
Don't see why username should make any difference, as long as it IS a valid user.
It does run the app, so it must be a valid username, seems the problem of root instead of user is elsewhere.
You are putting a dollar sign in front of the user's name? If so, bash will interpret the user's name as a variable, which you have not defined. This has the effect of leaving it out entirely! W/o a username supplied, su's behavior is to use root. I hope this is clear.
FYI, if you would prefer to log to the system log instead of your private file, you can put the line
Log notice syslog
in /usr/local/etc/tor/torrc. If you are modifying torrc.sample, I think you can just uncomment a line for this. (The last time I looked at the sample file was several versions ago.)
Yes, still the same. Uncomment would be all needed, however the file I made gets erased and re-written every connect, so no problem and syslog is already cluttered with boot messages and mysterious stuff such as "Jan 14 07:35:43 host pppd[3185]: Cannot determine ethernet address for proxy ARP
Jan 14 07:36:36 host pppd[3215]: Cannot determine ethernet address for proxy ARP"
This machine has no ethernet card. (Where's that head-scratching smilie?)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.