computer
 






 

Question by  craftypuppylover (33)

What two arguments does the setuid command take?

 
+7

Answer by  Christian9247 (5042)

Setuid doesn't take two arguments it only takes one. This is the User ID you want to use, example: int setuid(uid_t uid) these set ups are your needs in the script.

 
+7

Answer by  Charlton (192)

It sets the real and effective user IDs It has one argument of the uid type and returns 0 upon success, otherwise -1 as usually. It sets two values.

 
+7

Answer by  Alyaron (233)

setuid() doesn't take two arguments but only one, which is the user ID you want to use: int setuid(uid_t uid) according to the man entry. There are alternatives to setuid depending on your needs: setegid() seteuid() setgid() setuid(). Upon success, setuid() and all alternatives return 0; otherwise -1 is returned.

 
+6

Answer by  pcguy (307)

setuid is used to temporarily change the user id of the current user to execute a certain command as a different user. The first argument it takes is the uid of the user to be set, the second argument is the uid of the user to set it to.

 
+5

Answer by  jahankir (5)

setupid is a unix command argument that takes in a real userid and an effective user id.the first argument it takes is the uid of user to be set,the second argument is the uid of the user to set it pending on the need the alternative for setuid :setegid()seteuid() setgid()setuid().upon success setuid() return 0,otherwise return 1

 
+5

Answer by  Karthon (403)

setuid is a unix command shell argument that takes in a real user id and an effective user id so that it can establish a mapping between the two.

 
You have 50 words left!