LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Setting root permissions to a user? (https://www.linuxquestions.org/questions/slackware-14/setting-root-permissions-to-a-user-579512/)

zaqwe 08-24-2007 11:40 AM

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.

bsdunix 08-24-2007 11:49 AM

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.

dennisk 08-24-2007 12:02 PM

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

hitest 08-24-2007 12:07 PM

I just usually fire up a terminal prompt and su to root. That works for me:-)

Road_map 08-24-2007 12:14 PM

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


b0uncer 08-24-2007 01:19 PM

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.

hitest 08-24-2007 03:31 PM

Quote:

Originally Posted by b0uncer (Post 2869403)
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?

T3slider 08-24-2007 06:18 PM

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.

zaqwe 08-25-2007 05:07 PM

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


All times are GMT -5. The time now is 08:44 PM.