What do you use sudo for
I'm tired of using su -c for everything, and want to use sudo. The only problem is that whenever I go to configure sudo my mind draws a blank on what to add.:study:
So what are some of the things you guys use sudo for?:scratch: |
I use sudo because I'm also tired of using "su -" most of the time.
Don't know how you system is set up actually I mean what you're using it for. Mine is just for personal use, not a server so I just set sudo for everything and with no password :) Code:
chmod +w /etc/sudoers If you want to use sudo just for some commands, I actually think you need to spend some time and whenever you need a new command add it to the list until it meets your needs. Boby |
I posted a reply to a similar question a little bit ago that outlined my thought process for figuring out how to sudo correctly, maybe it will be of some use:
http://www.linuxquestions.org/questi...97#post2536497 best regards, ...drkstr |
I use sudo on my laptop and I do it the laziest way possible. When I make my user for the machine I add it to the wheel group and in visudo I just uncomment the sudo for wheel option with nopasswd. Takes all of 2 seconds and I can sudo to my heart's content with whatever I wish to do. For this reason I also add, via .bash_profile for my user, /sbin/ and /usr/sbin/ to my PATH.
This is only for my user, though. Should I add any other users to this machine they would not be in the wheel group nor would they get a beefy PATH. I would probably do something similar to drkstr's reference where only certain commands would be given sudo privileges and then aliased for convenience. On my machine that I use as a server, sudo is not used this way. I have the whole wheel thing set up but I uncomment the option where a password is necessary. I only did that because I'm so used to sudo this and sudo that... I would ssh over to the sever to do something and I would habitually use sudo for something simple and get aggravation. I don't modify the PATH on that machine except to remove .(current directory). With that being said, though, over time I found that using sudo just as annoying as su -c. Because of the nopasswd option it's clearly preferable but if I'm going to do a series of tasks I'm more apt to using su or even su - if I need something more robust. |
You can also make an alias:
alias su='sudo su' so you can su without no pass *if* you put the ALL=(ALL) NOPASSWD:ALL in sudoers file |
Does that give a particular user root priveledges without having to keep doing su all the time? isnt that kind of insecure?
|
I use it for gphoto2 and rioutil (software for my mp3 player), also formounting of stuff not in fstab.
|
Quote:
I only use this on my own system where there are no other users so it's quite safe. I wouldn't do this in a multi-user situation. |
Thanks, I will look into that. Mine is a single user system and I really get frustrated having to type in the root password all the time.
|
Thanks for all the great replies! My computer's mainly for personal use, security isn't too big of an issue, but I don't think I want to allow myself the ability to sudo everything without a password. (I've typed rm -rf once too many ;) )I think using aliases for stuff like using gphoto and MTP drivers along with not having to use a password would be nice. I'll probably add the pkgtools too. Other than that I think I'll add stuff as I go.
Thank you all very much, and if you still have different ways you use sudo I'd love to hear them.:D |
I don't use sudo, I have found no benefit to using it over su.
|
All times are GMT -5. The time now is 07:56 PM. |