Friday, January 18, 2013

Install Packages from Non-Admin Account in Linux Distro



In my last blog “Add user account to root in Ubuntu”, I had written about how we can add or give all root access to any account. Now in this blog I will explain you that how to give only installation access to any Non-Admin account. After giving this access to non-admin account, the user of this account can install as well as remove any packages to and from Non-Admin account.
This is one of most important trick for those Companies and Organization whose Admin is not able to install and removes each packages from every PC’s of each employee.
To use gedit you have to do following:

Open the Terminal and type:

       sudo gedit /etc/sudoers

 
If you want to use vim you can simply enter the following into the Terminal:

        sudo visudo

When you used the “sudo visudo” command in terminal the “sudoers” file is open in terminal with vim editor.
   
Once you have the sudoers file open, scroll down to the line:
   
         root   ALL = (ALL)ALL
After this, on next line of above statement writes following configuration,
         UserName ALL=NOPASSWD : /usr/bin/apt-get , /usr/bin/aptitude
You can change username with your non-Admin account name, save the sudoers file and logout from root account and try to install packages from non-Admin account.

No comments:

Post a Comment