Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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
1  
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.