LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-19-2012, 02:53 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
How do I run K3b as root?


Kernel 2.6.21.5, Slackware 12.0
K3b 1.0.2
cdrecord 2.01

Hi: when I run K3b, cdrecord complains about not having permissions. For instance,
Code:
/usr/bin/cdrecord: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits./usr/bin/cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).
This is output when asking K3b to show the debugging output. How can I run K3b as root? Of course I could start X as root, but I would not want to do it.
 
Old 04-19-2012, 03:14 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,292

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Try adding yourself to group cdrom.


usermod -G <stuff>
is the command - man usermod to find out the stuff
 
Old 04-19-2012, 10:42 PM   #3
kingbeowulf
Senior Member
 
Registered: Oct 2003
Location: WA
Distribution: Slackware
Posts: 1,266
Blog Entries: 11

Rep: Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744Reputation: 744
If you are in KDE, you can also use the kuser utility. I think you need to be in both plugdev and cdrom groups...but its been awhile
 
Old 04-20-2012, 05:48 AM   #4
red_fire
Member
 
Registered: Jan 2007
Location: Indonesia
Distribution: Slackware Linux
Posts: 67

Rep: Reputation: 11
alternatively, to run it as root,
use

$kdesu k3b
 
Old 04-20-2012, 06:26 AM   #5
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
I always belonged to the group 'users'. Now I did
Code:
usermod -G cdrom semoi
I hope I now belong to cdrom also. But still the same problem. I do not understand, because up to now, I think I always burned discs as semoi.
 
Old 04-20-2012, 07:04 AM   #6
mRgOBLIN
Slackware Contributor
 
Registered: Jun 2002
Location: New Zealand
Distribution: Slackware
Posts: 999

Rep: Reputation: 231Reputation: 231Reputation: 231
Anytime you modify your Group membership, you need to log out and back in for them to take effect.

The problem with using usermod is that it explicitly sets the groups to the ones passed as arguments and removes the rest.

You should probably do the following.

Code:
usermod -G users,dialout,audio,video,cdrom,plugdev,power,netdev semoi
Then log out and back in. You can check your group membership with the "groups" command.

In future you might try the "gpasswd" command like this.

Code:
gpasswd -a semoi cdrom

Last edited by mRgOBLIN; 04-20-2012 at 07:07 AM.
 
Old 03-03-2015, 12:42 AM   #7
CudaPrime
LQ Newbie
 
Registered: Mar 2015
Posts: 1

Rep: Reputation: Disabled
I'm using Kubuntu 14 (Debian jessie/sid)

Not sure if this is the 'proper' way to go about this, but, what I ended up doing is launching a konsole, #sudo su to log in as root
Then just ran the package with #k3b and it then launched k3b as root and I was then able to access the directories I wanted.

Hope that helps.
 
Old 03-03-2015, 06:39 AM   #8
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
Quote:
Originally Posted by CudaPrime View Post
I'm using Kubuntu 14 (Debian jessie/sid)

Not sure if this is the 'proper' way to go about this, but, what I ended up doing is launching a konsole, #sudo su to log in as root
Then just ran the package with #k3b and it then launched k3b as root and I was then able to access the directories I wanted.

Hope that helps.
You should not run GUI apps using sudo. You can cause a lot of issues with your system. The program sudo is for command line programs only and kdesu should be used if you need to run a GUI program as root.

https://help.ubuntu.com/community/Ro...Graphical_sudo

However, k3b should not need to be run as root if your permissions and groups are set up properly on your system.

Also, it is generally frowned upon to respond to old threads.
 
Old 03-03-2015, 11:10 AM   #9
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,225

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
CudaPrime: no, that is not the proper way to do it on Slackware. The proper way to do it on Slackware is actually documented:

Quote:
If you have permission errors when attempting to burn a cdrom or dvd image,
such as the following:
/usr/bin/cdrecord: Operation not permitted. Cannot send SCSI cmd via ioctl
then cdrecord almost certainly needs root privileges to work correctly.
One potential solution is to make the cdrecord and cdrdao binaries suid root,
but this has possible security implications. The safest way to do that is
to make those binaries suid root, owned by a specific group, and executable
by only root and members of that group. For most people, the example below
will be sufficient (but adjust as desired depending on your specific needs):
chown root:cdrom /usr/bin/cdrecord /usr/bin/cdrdao
chmod 4750 /usr/bin/cdrecord /usr/bin/cdrdao
If you don't want all members of the 'cdrom' group to be able to execute the
two suid binaries, then create a special group (such as 'burning' which is
recommended by k3b), use it instead of 'cdrom' in the line above, and add
to it only the users you wish to have access to cdrecord and cdrdao.
-- CHANGES_AND_HINTS.TXT
 
Old 03-03-2015, 12:19 PM   #10
Fred-1.2.13
Member
 
Registered: Jan 2006
Location: Midwest USA
Distribution: Started with Slackware - 3.0 1995 Kernel 1.2.13 - Now Slackware Current. Also some FreeBSD.
Posts: 124

Rep: Reputation: 59
Deleted

Last edited by Fred-1.2.13; 03-03-2015 at 12:32 PM. Reason: Old thread... post not relevent
 
Old 03-03-2015, 01:15 PM   #11
kikinovak
MLED Founder
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: CentOS, OpenSUSE
Posts: 3,453

Rep: Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154Reputation: 2154
Quote:
Originally Posted by stf92 View Post
Kernel 2.6.21.5, Slackware 12.0
K3b 1.0.2
cdrecord 2.01

Hi: when I run K3b, cdrecord complains about not having permissions. For instance,
Code:
/usr/bin/cdrecord: Operation not permitted. Warning: Cannot raise RLIMIT_MEMLOCK limits./usr/bin/cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).
This is output when asking K3b to show the debugging output. How can I run K3b as root? Of course I could start X as root, but I would not want to do it.
The answer is in the "Getting Started" section of the Slackware documentation.

http://docs.slackware.com/slackbook:users
 
Old 03-03-2015, 08:35 PM   #12
slacker1337
Member
 
Registered: Jun 2012
Location: Connecticut, USA
Distribution: Slackware
Posts: 148

Rep: Reputation: 40
Code:
usermod -G users,dialout,audio,video,cdrom,plugdev,power,netdev semoi
I've always had great success, and found it easier to simply do:
Code:
usermod -aG cdrom username
You are still required to log out and back in to update your profile.
 
  


Reply



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
K3b -Can it be run on OLD REDHAT 7.3???? chilibowl Linux - Software 1 11-12-2010 04:39 PM
Is a script, run at boot time from init.d, run with root authority? tmbrwolf53 Linux - Server 2 03-31-2007 08:15 PM
K3B will not run after upgrade.Help. rfurman24 Linux - Software 4 07-23-2005 12:10 PM
Can I run new k3b on 9.1? acanton Slackware 1 09-17-2004 11:01 AM
k3b startup will not run as anyone! mpoland Linux - Software 0 08-27-2004 04:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:24 PM.

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
Open Source Consulting | Domain Registration