How to switch users in the program?

Category: Linux/Unix Community -> Applications Author: ooberdom Date: 2006-02-27 17:47:44
2006-02-27 17:47:44
There are some operations to be switched to another user or user group next job. How can I ask in my process to switch to the specified user do?
I found that some people say calling su, su reading terminal can not read standard input stream.

ask whether the system provides the related functions?
Thank you!
2006-02-27 18:03:20
Other methods are more complex, such as the su command as ...
better to use chmod u + s way to achieve it ...
2006-02-27 18:18:12
chmod u + s pose a security risk. . . . . sudo-u username command --- not on line yet, but remember to use visudo to add a user can use sudo. . . . Do not use vi / etc / sudoers sudoers this method to edit this file, it is said will cause what is wrong, but I have never encountered an error grindstone (formerly editor is such)
2006-02-27 18:29:31

file can restrict permissions can modify a part?
2006-02-27 18:48:34
2006-02-27 18:55:11
program which switch users?

Username Password is interactive terminal program to use?
2006-02-27 19:10:14
precisely because of security risks to consider why I come here to ask. Because I need to give a tool used to modify another account of a file, but only allowed to modify his own part, but not modify someone else's part. So I think in the tool handle, do not he modified files. And access to that file will be exposed would cause safety problems. Do not give others root privileges.
2006-02-27 19:23:45

because the system does not provide this capability, so I have to control their own. Of course, I do not pop Editor allows users to edit a part of it, I just do they have related to the CUI relevant configuration, hidden for the user file concept.
2006-02-27 19:41:13
learn ~ ~
2006-02-27 19:59:29
said simply, I want to ask questions and edit the file has nothing to do slightest relationship. I want to know is how other users to run the current process. This is relevant in Windows support, linux under I think I should have it.