ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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 am trying to run a game server on a Linux machine and what i would like is for it to start automatically when i boot the machine, which i have figured out, however, what i would also like is for it to switch users before it runs so that it is not running as root, but no matter what i try, it seems to switch the user then stall. It never actually starts the game. Any suggestions? Please help me!
When the script is run as root it will create a file called dude that is owned by crabboy. This means that crabboys shell is actully calling touch; thus working correctly. Have you tried this yet?
If this does not help, then post what you have tried and the exact symptoms.
And i have a link to this in the SysV init config, so that it starts when i boot the machine.
My problem is that when I tried switching users it would boot the computer, switch user, but would not run the game. It is supposed to be in the background as designated by the "&" but what i found was happening is that after it would switch user the shell prompt would come up in the login field and i couldn't do anything after that. It looked something like this:
Login: bash$
and that is all i can get. So if i was to use yours as an example where would i put the name of the game? Also there is a symbollic link to this script called "cstrike" would it be better for me to create the switch user something like yours and call cstrike in that? If so where do i then call cstrike in your script.
Sorry to be so dumb, but thanx for all your help.
Brian
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.