LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 08-24-2007, 11:40 AM   #1
zaqwe
Member
 
Registered: Aug 2007
Distribution: Ubuntu 7.10
Posts: 43

Rep: Reputation: 15
Setting root permissions to a user?


So how I could set root permissions to a user? Or should I give other permissions, so I could use command "sudo", browse root folders and etc.?


-Thanks.
 
Old 08-24-2007, 11:49 AM   #2
bsdunix
Senior Member
 
Registered: May 2006
Distribution: BeOS, BSD, Caldera, CTOS, Debian, LFS, Mac, Mandrake, Red Hat, Slackware, Solaris, SuSE
Posts: 1,761

Rep: Reputation: 80
I recommend using sudo.

Quick HOWTO : Ch09 : Linux Users and Sudo
http://www.linuxhomenetworking.com/w...Users_and_Sudo

Without giving out the root password, you can allow as much "root" system command access as necessary to select users.
 
Old 08-24-2007, 12:02 PM   #3
dennisk
Member
 
Registered: May 2004
Location: Southwestern USA
Distribution: CentOS
Posts: 279

Rep: Reputation: 30
You can also type

Quote:
ALT F2 "kdesu <your command here>"
to work as root inside KDE using standard KDE tools like kedit and konqueror.

Bit more user friendly. :-)

Dennisk
 
Old 08-24-2007, 12:07 PM   #4
hitest
Guru
 
Registered: Mar 2004
Location: Canada
Distribution: Void, Debian, Slackware
Posts: 7,342

Rep: Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746
I just usually fire up a terminal prompt and su to root. That works for me:-)
 
Old 08-24-2007, 12:14 PM   #5
Road_map
Member
 
Registered: Jan 2007
Distribution: Slackware
Posts: 341

Rep: Reputation: 31
There is a configuration file (/etc/sudoers) that allow what you are looking for, but you must be very carefully what you modify here.
Example:
Code:
%users  ALL=/sbin/mount /mnt/slackw,/sbin/umount /mnt/slackw
will allow to mount and umount /mnt/slackw partition by typing
Code:
~$ sudo umount /mnt/slackw
~$ sudo mount /mnt/slackw
 
Old 08-24-2007, 01:19 PM   #6
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Quote:
I just usually fire up a terminal prompt and su to root. That works for me:-)
Works for single-user machine when you're not worried about security (read: you don't have anything valuable on your machine and couldn't care less if it was trashed or used in acts of crime without asking your permission). In any other case it's strongly recommended not to use 'su' in daily usage..use 'sudo' instead, and use your brains when configuring it (so you don't accidentally let everybody have a root login shell without password-asking trough sudo).

Best configuration is probably to disable root account completely and do admin tasks using well configured sudo. Restrict everything, permit as little as possible so that things still work; a lot better than allowing everything and restricting a few funny things.
 
Old 08-24-2007, 03:31 PM   #7
hitest
Guru
 
Registered: Mar 2004
Location: Canada
Distribution: Void, Debian, Slackware
Posts: 7,342

Rep: Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746
Smile

Quote:
Originally Posted by b0uncer View Post
Works for single-user machine when you're not worried about security (read: you don't have anything valuable on your machine and couldn't care less if it was trashed or used in acts of crime without asking your permission). In any other case it's strongly recommended not to use 'su' in daily usage..use 'sudo' instead, and use your brains when configuring it (so you don't accidentally let everybody have a root login shell without password-asking trough sudo).

Best configuration is probably to disable root account completely and do admin tasks using well configured sudo. Restrict everything, permit as little as possible so that things still work; a lot better than allowing everything and restricting a few funny things.
Thanks for the reply:-)
When you say that my box could get trashed are you speaking about it getting hacked over the Internet?
My box is reasonably secure behind a router, I run it as a regular user. My unit is not a server and ssh and other services are disabled. I scan my unit for hacking attempts on a semi-regular basis. Given that my unit is only used by me in my home do you think that using su poses a real threat for my desktop?
 
Old 08-24-2007, 06:18 PM   #8
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
b0uncer, I must disagree with you. I think using "su" is perfectly safe if you want to perform administrative tasks (ie installing programs etc.) without actually signing in as root (which is even more dangerous). In fact, I think setting up sudo aliases that grant permission to install programs using only your USER password is MORE dangerous than using "su" to act as root. With all these sudo aliases, if anyone hacks into your machine (or if anyone has physical access), they only need info about the account to which you are currently logged in to trash your system. That is a little more dangerous in my opinion than logging in as a user having almost no permissions (besides maybe mounting/unmounting etc.) and becoming root through "su" to perform administrative tasks, which should NOT be every two seconds. Plus, using "su" only opens the root account in the terminal you are currently using.

IF, however, you are on a multiuser system and you want to grant access to others, sudo is the best way (ie you should never give your root password to anyone if you are the system administrator). So, in this case, you are correct -- you can allow others to do things without requiring the root password. However, if you are the system administrator, YOU should still use "su" instead of sudo aliases that are more lenient (ie only require your user password).

I am not knowledgeable on the subject, so feel free to rip apart everything I just said. I, however, will continue to use "su" unless someone shows that it really is much less secure than sudo aliases.
 
Old 08-25-2007, 05:07 PM   #9
zaqwe
Member
 
Registered: Aug 2007
Distribution: Ubuntu 7.10
Posts: 43

Original Poster
Rep: Reputation: 15
Ok, now I have sudo rights.. How could i chmod my storage media (winblows partitions) that specified group can read and write in there?
 
  


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
Setting permissions as user with nice? NightSoul Linux - Software 1 06-09-2006 12:01 PM
Setting user permissions PeteWieland Linux - Newbie 2 04-16-2005 06:35 AM
Setting User Permissions anon111 Linux - Newbie 3 04-12-2005 10:21 AM
Setting user network permissions beforemath Linux - Networking 2 02-28-2005 03:53 PM
Setting default permissions for user loadedmind Slackware 3 11-05-2003 03:24 PM

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

All times are GMT -5. The time now is 04:40 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
Open Source Consulting | Domain Registration