LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-09-2005, 01:00 AM   #1
Kilahchris
Member
 
Registered: Jan 2003
Location: NY
Distribution: Suse 9.0
Posts: 202

Rep: Reputation: 30
how to give a nonroot user write access


Im currently using Suse 9.2
I noticed a tighter restriction on the user that i created during the initial installation of this program.

In previous versions of Suse the non root user i would create would be able to install rpm packages without receiving an error



Quote:
error: cannot get exclusive lock on /var/lib/rpm/Packages
error: cannot open Packages index using db3 - Operation not permitted (1)
error: cannot open Packages database in /var/lib/rpm
is there a way to give a non root user write privliges without using the su command??
 
Old 05-09-2005, 01:34 AM   #2
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 48
man sudoers

KC
 
Old 05-09-2005, 01:49 AM   #3
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 51
maybe there is a rpm group in which you can add the user? it's been a long time i haven't use rpm distros.
 
Old 05-09-2005, 01:59 AM   #4
Kilahchris
Member
 
Registered: Jan 2003
Location: NY
Distribution: Suse 9.0
Posts: 202

Original Poster
Rep: Reputation: 30
yes i thought about assinging my current non root user to another group.

I added the user to the root group. However i was still unable to install the rpm???

Last edited by Kilahchris; 05-09-2005 at 02:01 AM.
 
Old 05-09-2005, 06:22 AM   #5
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Easiest approach is to use sudo, as pointed out previously: read the man pages for sudo and sudoers.

You could check owner and group info for the rpm packages for a clue for what group to add to the user profile.
 
Old 05-09-2005, 10:57 AM   #6
runlevel0
Member
 
Registered: Mar 2005
Location: Hilversum/Holland
Distribution: Debian GNU/Linux 5.0 (“Lenny”)
Posts: 290

Rep: Reputation: 31
Re: how to give a nonroot user write access

Quote:
Originally posted by Kilahchris
Im currently using Suse 9.2
I noticed a tighter restriction on the user that i created during the initial installation of this program.

In previous versions of Suse the non root user i would create would be able to install rpm packages without receiving an error
is there a way to give a non root user write privliges without using the su command??
This is very strange. I have been a long time SUSE user, i indeed used the "previous" version, SUSE 9.1 and 9.0 and I can swear that I have never been able to install an RPM package w/o getting root.

Yast uses kdesu or gnomesu. Perhaps you have been working with the "store password" option enabled, but thus you would have been asked at least once per session.

I can't stat either if enabling a user to run RPM wouldn't cause complaints because it's not only RPM, but the databases and scripts, and those are not changed 'sudoing' the rpm binary.

Perhaps putting the default user into the wheel or admin group would work, but this is a completely braindead idea and I can't think of professionals like the people at SUSE and Novell doing nonsense like this.

IF you want to install stuff you downloaded from the Internet use Konqueror / Mozilla, click on the file to fire up Yast, type the root password and you are done. If you want to get rid of the passwd prompt for a short period of time check the "store passwd" checkbox.
 
Old 05-09-2005, 06:09 PM   #7
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
It is usually the setup that you must be root to install packages. Lets face it, you don't want just anyone to be able to install packages on your system. Who knows what they'd do.
 
Old 05-09-2005, 06:48 PM   #8
Kilahchris
Member
 
Registered: Jan 2003
Location: NY
Distribution: Suse 9.0
Posts: 202

Original Poster
Rep: Reputation: 30
I understand the security concerns.

However it is a hassle when i would like to use certain programs like K3b.
k3b uses cdrecord. It will only work when I am logged on as root.
Given the security concerns I would like my local user to be able to use cdrecord with out logging in the system as root.

can this be done if I assign him to an appropriate group. I have already tried assigning the user kilahchris to the root group. I still do not have permission to use the cdrecord program when logged in as kilahchris.


ps I already know about the SU command. I want to know of alternatives options???

Last edited by Kilahchris; 05-09-2005 at 06:51 PM.
 
Old 05-11-2005, 03:10 AM   #9
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Not su, sudo and sudoers ...

As user - try
Code:
sudo /usr/bin/cdrecord --scanbus
Normally you cannot do this as a user. "sudo" prompts the user to repeat their login password, then allows the specified action alone as root.

However, you have to be in the sudoers list ...

see the man pages for sudo and sudoers.

A sample sudoers entry for k3b would be something like:

Code:
user-name    computer-hostname=NOPASSWD:/usr/bin/k3b
That should fix things from your users point of view. And you can do the sam for anything you want users to have access to. Be sure to read the security concerns though.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
give user access to mount xbriank Fedora 2 02-15-2005 07:44 PM
How to give a drive write access to all users in FSTAB? (ext3) jon_k Linux - Software 2 12-19-2004 10:46 PM
Give Root Access To A Normal User waknauss Linux - Security 2 11-11-2004 10:00 AM
how to give a normal user access to cd burning? zero79 Debian 2 08-14-2004 09:38 PM
give user SU to access evrything? OverrRyde Mandriva 8 08-05-2004 02:58 PM


All times are GMT -5. The time now is 04:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration