Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In startos (with the ypkg packages), their app store somehow can download and install packages, without the prompt of any root or user password, to the root protected folders of /usr ...etc. However their command line program (using same package format) requires my password (I am a sudoer though).

My questions: Is there any way to do this with the ubuntu software center? How does this work? (allow a program root access without password from user)

share|improve this question
up vote 1 down vote accepted

Turn on the Set User ID (SUID) bit on the program:

sudo chmod u+s /usr/bin/software-center

Every time this program starts, it has the privilege of the owner (owner should be root to gain root powers). Any child processes that the program forks() will inherit the root privileges. This won't work however if the prompting of the password does not depend on the effective user id of the program (i.e. it's been programmed to always prompt).

share|improve this answer
ok cool, could you explain what u+s, as far as I know, is it user add setuid? – agz Jan 13 '13 at 18:54
The 'u' tells chmod to modify the permission bits of the user (owner) of the file (type ls -l 'filename' on the terminal). The '+' means to add to the permission bits. The 's' means to turn on the setuid bit, meaning that whoever runs the file will have the permissions of the owner of the file. – WikiWitz Jan 13 '13 at 19:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .