About installing the plugin of the Adobe Flash Player for Firefox,I know the file of libflashplayer.so should be copied to /usr/lib64/mozilla/plugin.By Terminal,after I input the command of sudo cp libflashplayer.so /usr/lib64/mozilla/plugins,the result is username is not in sudoers folder,this will be reported : What should I do ?
On 06/10/2013 08:57 PM, Lingxian Guo wrote:
About installing the plugin of the Adobe Flash Player for Firefox,I know the file of libflashplayer.so should be copied to /usr/lib64/mozilla/plugin.By Terminal,after I input the command of sudo cp libflashplayer.so /usr/lib64/mozilla/plugins,the result is username is not in sudoers folder,this will be reported : What should I do ?
You need to edit the sudoers file. You should find a copy that works and make yours look like that. (Hint: you need to add a line with your user name and the word ALL in it.) You can edit it with any editor, or if you know vi, then you can use visudo. You will have to have admin privileges to do this, so if you can't su to root, you will need to find out how to do that, first.
On 06/10/2013 06:10 PM, Doug wrote:
You need to edit the sudoers file. You should find a copy that works and make yours look like that. (Hint: you need to add a line with your user name and the word ALL in it.) You can edit it with any editor, or if you know vi, then you can use visudo. You will have to have admin privileges to do this, so if you can't su to root, you will need to find out how to do that, first.
And of course, if you can do that, you don't need sudo. To me, sudo is a fine tool if you want to give access to a few admin tools to people who don't (and shouldn't) know the root password. However, I can't see the point of using it if you're the person who installed Linux and created the root password.
Allegedly, on or about 10 June 2013, Joe Zeff sent:
To me, sudo is a fine tool if you want to give access to a few admin tools to people who don't (and shouldn't) know the root password. However, I can't see the point of using it if you're the person who installed Linux and created the root password.
I can see only two reasons for using sudo when you're the sole computer user and owner:
Once the command finishes, your terminal is left with your unprivileged logon, so there's less chance of serious mistakes happening by accident (e.g. badly wildcarded "rm" commands), if you're going to keep that terminal open.
Potentially, there should be less chance for something to snaffle up a copy of your root password if you're not typing it. Though I suspect that if there is anything hanging around that could do that, then you're already screwed.
And it's not just the potential for issuing dangerous commands in a root terminal, that's a problem. People logged in as root often stay logged in as root, doing things as root when they don't really need to. Then they find that they're painted themselves into a corner, as some files they wanted to use are owned by root, so they log back in as root, yet again, for a really bad reason.
That said, I've really only recently made practical use of sudo, and can't say that *I* find it to be a stand-out better thing to do than doing "su -", I still do it either way.
On 06/11/2013 08:31 AM, Tim wrote:
Allegedly, on or about 10 June 2013, Joe Zeff sent:
To me, sudo is a fine tool if you want to give access to a few admin tools to people who don't (and shouldn't) know the root password. However, I can't see the point of using it if you're the person who installed Linux and created the root password.
I can see only two reasons for using sudo when you're the sole computer user and owner:
Once the command finishes, your terminal is left with your unprivileged logon, so there's less chance of serious mistakes happening by accident (e.g. badly wildcarded "rm" commands), if you're going to keep that terminal open.
Potentially, there should be less chance for something to snaffle up a copy of your root password if you're not typing it. Though I suspect that if there is anything hanging around that could do that, then you're already screwed.
And it's not just the potential for issuing dangerous commands in a root terminal, that's a problem. People logged in as root often stay logged in as root, doing things as root when they don't really need to. Then they find that they're painted themselves into a corner, as some files they wanted to use are owned by root, so they log back in as root, yet again, for a really bad reason.
That said, I've really only recently made practical use of sudo, and can't say that *I* find it to be a stand-out better thing to do than doing "su -", I still do it either way.
When you're done with whatever you did and you get distracted then return to the computer, you'll probably forget you are logged in as root. And that's when a stupid command causes chaos. With sudo, you're using root level privs on a command-by-command basis, so there's less chance of blowing off some toes.
On 06/11/2013 08:01 AM, Steven Stern wrote:
When you're done with whatever you did and you get distracted then return to the computer, you'll probably forget you are logged in as root.
That's why you either log out from root or close the terminal as soon as you're done doing root stuph.
On 06/11/2013 01:24 PM, Joe Zeff wrote:
On 06/11/2013 08:01 AM, Steven Stern wrote:
When you're done with whatever you did and you get distracted then return to the computer, you'll probably forget you are logged in as root.
That's why you either log out from root or close the terminal as soon as you're done doing root stuph.
Clearly, you're younger than I or less easily distracted.
On 06/11/2013 12:03 PM, Steven Stern wrote:
On 06/11/2013 01:24 PM, Joe Zeff wrote:
On 06/11/2013 08:01 AM, Steven Stern wrote:
When you're done with whatever you did and you get distracted then return to the computer, you'll probably forget you are logged in as root.
That's why you either log out from root or close the terminal as soon as you're done doing root stuph.
Clearly, you're younger than I or less easily distracted.
Not the first, unless you're older than I think. I'm not just a Boomer, I'm a very early Boomer, being born in 1949. And, as far as the second, I've never been accused of being easily distracted.
On 06/11/2013 12:32 PM, Joe Zeff issued this missive:
On 06/11/2013 12:03 PM, Steven Stern wrote:
On 06/11/2013 01:24 PM, Joe Zeff wrote:
On 06/11/2013 08:01 AM, Steven Stern wrote:
When you're done with whatever you did and you get distracted then return to the computer, you'll probably forget you are logged in as root.
That's why you either log out from root or close the terminal as soon as you're done doing root stuph.
Clearly, you're younger than I or less easily distracted.
Not the first, unless you're older than I think. I'm not just a Boomer, I'm a very early Boomer, being born in 1949. And, as far as the second, I've never been accused of being easily distracted.
I'm a late boomer ('57) and I'm also not easily...oooooh! Shiny!.....
(sorry...couldn't resist!) ---------------------------------------------------------------------- - Rick Stevens, Systems Engineer, AllDigital ricks@alldigital.com - - AIM/Skype: therps2 ICQ: 22643734 Yahoo: origrps2 - - - - Duct Tape + Magic Marker = Label Maker! - ----------------------------------------------------------------------
On 11 June 2013 20:03, Steven Stern subscribed-lists@sterndata.com wrote:
On 06/11/2013 01:24 PM, Joe Zeff wrote:
On 06/11/2013 08:01 AM, Steven Stern wrote:
When you're done with whatever you did and you get distracted then return to the computer, you'll probably forget you are logged in as root.
That's why you either log out from root or close the terminal as soon as you're done doing root stuph.
Clearly, you're younger than I or less easily distracted.
I sometimes work with quite a lot of terminals, my two rules for doing this are: 1. Drop out of root as soon as you're done. 2. If you can't remember the state of a given session close it and start a new one.
- For both paying attention to the #/$ prompt and CWD display are helpful. That's what I check whenever I switch to a given terminal (also useful to know which machine you're logged into). Arguably there's more potential for confusion if you normally only work in one, because you get more reliant on remembering the state.
Am 12.06.2013 01:05, schrieb Ian Malone:
I sometimes work with quite a lot of terminals, my two rules for doing this are:
- Drop out of root as soon as you're done.
- If you can't remember the state of a given session close it and
start a new one.
- For both paying attention to the #/$ prompt and CWD display are
helpful. That's what I check whenever I switch to a given terminal (also useful to know which machine you're logged into). Arguably there's more potential for confusion if you normally only work in one, because you get more reliant on remembering the state
[root@srv-rhsoft:~]$ cat /root/.bashrc | grep PS1 PS1="[\033[1;31m][\u@\h:\w]$[\033[0m] "
[harry@srv-rhsoft:~]$ cat /home/harry/.bashrc | grep PS1 PS1="[\033[1;32m][\u@\h:\w]$[\033[0m] "
results in a red prompt for root and a green for my users and on production-servers i have as well as on backup-servers different colors again since at least 2007 at this works well
On 06/11/2013 04:05 PM, Ian Malone wrote:
- For both paying attention to the #/$ prompt and CWD display are
helpful. That's what I check whenever I switch to a given terminal (also useful to know which machine you're logged into). Arguably there's more potential for confusion if you normally only work in one, because you get more reliant on remembering the state.
FWIW, I once remember reading a post on Usenet where an admin wrote about working at a shop, once, where no admin was considered fully trained until he'd lost track of which box he was logged into and rebooted the wrong one at least once. Another admin in that group once claimed that the only use he had for a GUI at work was so that he could have 19 xterms open, logged into various different machines, and sometimes into different accounts and/or directories on the same machine.
On 06/11/2013 06:31 AM, Tim wrote:
Once the command finishes, your terminal is left with your unprivileged logon, so there's less chance of serious mistakes happening by accident (e.g. badly wildcarded "rm" commands), if you're going to keep that terminal open.
If you only need to run one command, use su -c; as far as the second goes, there's a reason that by default rm for root is aliased to rm -i.
Allegedly, on or about 11 June 2013, Joe Zeff sent:
there's a reason that by default rm for root is aliased to rm -i.
Never rely on that, not to mention that there are plenty of other commands that you can foolishly hose a system with. And you may not get that alias if you use one of the alternative shells.
On 06/11/2013 05:29 PM, Tim wrote:
Never rely on that, not to mention that there are plenty of other commands that you can foolishly hose a system with. And you may not get that alias if you use one of the alternative shells.
Agreed. However, it can be argued that if you know enough to do that, you should also know enough to be careful with rm. As root, unless I'm deleting exactly one file, I use ls first to see exactly what I'm going to delete. It's a form of "measure twice, cut once" that's prevented at least one disaster over the years. (N.B.: once you've examined the results of ls, the safest way to use rm is to use the up arrow to get back the preceding command line, then edit it. That's probably the best way to be sure that what you delete is what you listed.)
On 06/11/2013 09:00 PM, Joe Zeff wrote:
On 06/11/2013 05:29 PM, Tim wrote:
Agreed. However, it can be argued that if you know enough to do that, you should also know enough to be careful with rm. As root, unless I'm deleting exactly one file, I use ls first to see exactly what I'm going to delete. It's a form of "measure twice, cut once" that's prevented at least one disaster over the years. (N.B.: once you've examined the results of ls, the safest way to use rm is to use the up arrow to get back the preceding command line, then edit it. That's probably the best way to be sure that what you delete is what you listed.)
I find that when you are going to perform some kind of action on a file, and you have found it using ls -la, highlight the file and ctrl-shift-c. Then whetever your command is, command ctrl-shift-v.
That's a better option than command filename-without-last-part* because there may be two or more identical first part filenames, but different extensions. The most obvious is filename and filename.bak. Another common example is a filename with two or more version numbers in the extensions.
--doug
On Tue, 2013-06-11 at 21:22 -0400, Doug wrote:
On 06/11/2013 09:00 PM, Joe Zeff wrote:
On 06/11/2013 05:29 PM, Tim wrote:
Agreed. However, it can be argued that if you know enough to do that, you should also know enough to be careful with rm. As root, unless I'm deleting exactly one file, I use ls first to see exactly what I'm going to delete. It's a form of "measure twice, cut once" that's prevented at least one disaster over the years. (N.B.: once you've examined the results of ls, the safest way to use rm is to use the up arrow to get back the preceding command line, then edit it. That's probably the best way to be sure that what you delete is what you listed.)
I find that when you are going to perform some kind of action on a file, and you have found it using ls -la, highlight the file and ctrl-shift-c. Then whetever your command is, command ctrl-shift-v.
That's a better option than command filename-without-last-part* because there may be two or more identical first part filenames, but different extensions. The most obvious is filename and filename.bak. Another common example is a filename with two or more version numbers in the extensions.
--doug
-- Blessed are the peacemakers..for they shall be shot at from both sides. --A.M.Greeley
Tip from this list I think
If using "su -" regularly add this to /root/.bashrc to obtain the root prompt in red
PS1="[\033[1;31m][\u@\h:\w]$[\033[0m] "
John
On 06/12/2013 01:54 PM, John Austin wrote:
On Tue, 2013-06-11 at 21:22 -0400, Doug wrote:
On 06/11/2013 09:00 PM, Joe Zeff wrote:
On 06/11/2013 05:29 PM, Tim wrote:
Agreed. However, it can be argued that if you know enough to do that, you should also know enough to be careful with rm. As root, unless I'm deleting exactly one file, I use ls first to see exactly what I'm going to delete. It's a form of "measure twice, cut once" that's prevented at least one disaster over the years. (N.B.: once you've examined the results of ls, the safest way to use rm is to use the up arrow to get back the preceding command line, then edit it. That's probably the best way to be sure that what you delete is what you listed.)
I find that when you are going to perform some kind of action on a file, and you have found it using ls -la, highlight the file and ctrl-shift-c. Then whetever your command is, command ctrl-shift-v.
That's a better option than command filename-without-last-part* because there may be two or more identical first part filenames, but different extensions. The most obvious is filename and filename.bak. Another common example is a filename with two or more version numbers in the extensions.
--doug
-- Blessed are the peacemakers..for they shall be shot at from both sides. --A.M.Greeley
Tip from this list I think
If using "su -" regularly add this to /root/.bashrc to obtain the root prompt in red
PS1="[\033[1;31m][\u@\h:\w]$[\033[0m] "
John
That is a good tip ...but probably not for the colour-blind ;-)
Thanks.
John:
If using "su -" regularly add this to /root/.bashrc to obtain the root prompt in red
PS1="[\033[1;31m][\u@\h:\w]$[\033[0m] "
Rejy M Cyriac:
That is a good tip ...but probably not for the colour-blind ;-)
Use inverse colours, then (black text on a coloured background). Having said that, I wanted to do that in the past, and it didn't seem to work.
On 06/12/2013 08:00 PM, Tim wrote:
John:
If using "su -" regularly add this to /root/.bashrc to obtain the root prompt in red
PS1="[\033[1;31m][\u@\h:\w]$[\033[0m] "
Rejy M Cyriac:
That is a good tip ...but probably not for the colour-blind ;-)
Use inverse colours, then (black text on a coloured background). Having said that, I wanted to do that in the past, and it didn't seem to work.
+1
In gnome terminal I created the profile which did this... red translucent background and ran "su -" on opening new tab for that profile. Helps when you can easily have 8+ terminals going and need a quick color que as to your elevated login status. My background schemes tend to be white for local, black for remote (ssh etc), and red for any root.
On 06/10/2013 09:38 PM, Joe Zeff wrote:
On 06/10/2013 06:10 PM, Doug wrote:
You need to edit the sudoers file. You should find a copy that works and make yours look like that. (Hint: you need to add a line with your user name and the word ALL in it.) You can edit it with any editor, or if you know vi, then you can use visudo. You will have to have admin privileges to do this, so if you can't su to root, you will need to find out how to do that, first.
And of course, if you can do that, you don't need sudo. To me, sudo is a fine tool if you want to give access to a few admin tools to people who don't (and shouldn't) know the root password. However, I can't see the point of using it if you're the person who installed Linux and created the root password.
For me personally, using sudo on a personal system is just best practices since I administer other servers; discipline if you will. Having done root and sudo at some point during my use of *nix the sudo is not particularly inconvenient. If I have a few things to do as root I will sudo. If I have several things to do as root I will su to root. If I have root environment specific things I need to do I will su - or login directly to root. I prefer not to stay there any longer than necessary and for security my root pw tends to be, well... long. As mentioned, it is the beauty of the *nix world. Do what works best for you.
Adding a user I simply edit the /etc/sudoers file with vi with the + flag (so I don't have to scroll down so far) and add my user.
## Allow root to run any commands anywhere root ALL=(ALL) ALL
edited to:
## Allow root to run any commands anywhere root ALL=(ALL) ALL user ALL=(ALL) ALL
This has worked for me.
Fred
On Mon, 10 Jun 2013 21:10:34 -0400 ...........snip
You need to edit the sudoers file. You should find a copy that works and make yours look like that. (Hint: you need to add a line with your user name and the word ALL in it.) You can edit it with any editor, or if you know vi, then you can use visudo. You will have to have admin privileges to do this, so if you can't su to root, you will need to find out how to do that, first.
etc]$ sudo cat sudoers ## Sudoers allows particular users to run various commands as ## the root user, without needing the root password. ## ## Examples are provided at the bottom of the file for collections ## of related commands, which can then be delegated out to particular ## users or groups. ## ## This file must be edited with the 'visudo' command. ^ | Is this not true any more?
On 06/11/2013 01:52 AM, Fred Erickson wrote:
On Mon, 10 Jun 2013 21:10:34 -0400 ...........snip
You need to edit the sudoers file. You should find a copy that works and make yours look like that. (Hint: you need to add a line with your user name and the word ALL in it.) You can edit it with any editor, or if you know vi, then you can use visudo. You will have to have admin privileges to do this, so if you can't su to root, you will need to find out how to do that, first.
etc]$ sudo cat sudoers ## Sudoers allows particular users to run various commands as ## the root user, without needing the root password. ## ## Examples are provided at the bottom of the file for collections ## of related commands, which can then be delegated out to particular ## users or groups. ## ## This file must be edited with the 'visudo' command. ^ | Is this not true any more?
No, it has never been true. But visudo will catch any boo-boos you make. Sudoers is just a text file, and you can edit it with any editor, even Kate. Just be careful.
--doug
On Mon, Jun 10, 2013 at 09:10:34PM -0400, Doug wrote:
On 06/10/2013 08:57 PM, Lingxian Guo wrote:
About installing the plugin of the Adobe Flash Player for Firefox,I know the file of libflashplayer.so should be copied to /usr/lib64/mozilla/plugin.By Terminal,after I input the command of sudo cp libflashplayer.so /usr/lib64/mozilla/plugins,the result is username is not in sudoers folder,this will be reported : What should I do ?
You need to edit the sudoers file. You should find a copy that works and make yours look like that. (Hint: you need to add a line with your user name and the word ALL in it.) You can edit it with any
Or, on Fedora, add yourself to the "wheel" group (and log out and in again). You can do this with "User Manager" tool in gnome, or with
gpasswd wheel -a username
as root or via sudo from another user with sudo privs.
On 06/11/2013 01:23 PM, Matthew Miller wrote:
Or, on Fedora, add yourself to the "wheel" group (and log out and in again). You can do this with "User Manager" tool in gnome, or with
gpasswd wheel -a username
as root or via sudo from another user with sudo privs.
I tried putting myself into wheel once when I did a clean install. I found it very off-putting, to say the least, to find that giving the root password when prompted (or so I thought) didn't work because the system was expecting *my* password, not root's. As soon as I understood what had happened, I removed myself from wheel, so that I could administer both machines in the same way. YMMV, of course, and if you're fairly new to Linux, you might find giving your password instead of root's more intuitive.
On a side note (F#) when I first started learning about *nix, one of the things I didn't like is the fact that there were so many different ways to get the same thing done, depending on (among other things) which shell you were using. Now, I've grown to like it because it means that different people with different needs and/or tastes can all do things the way they like instead of there being One True Way. Using su or sudo is just another example.
On Tue, Jun 11, 2013 at 01:54:21PM -0700, Joe Zeff wrote:
I tried putting myself into wheel once when I did a clean install. I found it very off-putting, to say the least, to find that giving the root password when prompted (or so I thought) didn't work because the system was expecting *my* password, not root's. As soon
Here I think you're talking about the policykit dialogs in the desktop, right?
The prompt should be different for auth-as-self vs. auth-as-root.
as I understood what had happened, I removed myself from wheel, so that I could administer both machines in the same way. YMMV, of course, and if you're fairly new to Linux, you might find giving your password instead of root's more intuitive.
Well, in any case you might find it "like sudo".
things) which shell you were using. Now, I've grown to like it because it means that different people with different needs and/or tastes can all do things the way they like instead of there being One True Way. Using su or sudo is just another example.
Yep.
I wrote little essay on the relative merits of sudo and root login on Stack Exchange, which might be interesting for anyone for whom this whole thread is interesting: http://unix.stackexchange.com/a/8588/2511
On 06/11/2013 02:11 PM, Matthew Miller wrote:
Here I think you're talking about the policykit dialogs in the desktop, right?
The prompt should be different for auth-as-self vs. auth-as-root.
Yes, it was. However, I'd been in the habit of putting root's password into those dialog boxes for so long that I just did it by reflex. In fact, it wasn't until somebody at fedoraforums pointed it out to me that I realized what the issue was and corrected it. (First, I gave yumex my password so that it could update the system. Then, after thinking about it I took myself out of wheel for the reasons given before.)
Allegedly, on or about 11 June 2013, Matthew Miller sent:
The prompt should be different for auth-as-self vs. auth-as-root.
Sometimes a prompt is a rather vague you must authenticate type of phrase.
On 06/11/2013 05:31 PM, Tim wrote:
Allegedly, on or about 11 June 2013, Matthew Miller sent:
The prompt should be different for auth-as-self vs. auth-as-root.
Sometimes a prompt is a rather vague you must authenticate type of phrase.
Once it was pointed out to me, I looked, and it did ask for my password, not root's. It was very specific about it. I just hadn't actually read it before because I thought I knew what it wanted.
On Mon, Jun 10, 2013 at 5:57 PM, Lingxian Guo LingxianGuo@hotmail.com wrote:
About installing the plugin of the Adobe Flash Player for Firefox,I know the file of libflashplayer.so should be copied to /usr/lib64/mozilla/plugin.By Terminal,after I input the command of sudo cp libflashplayer.so /usr/lib64/mozilla/plugins,the result is username is not in sudoers folder,this will be reported : What should I do ? --
When I went through this, I just added my user to the sudoers file to fix it. Visudo is probably best, as Doug suggested earlier.
Richard
Allegedly, on or about 11 June 2013, Lingxian Guo sent:
About installing the plugin of the Adobe Flash Player for Firefox,I know the file of libflashplayer.so should be copied to /usr/lib64/mozilla/plugin.
That approach for installing the Flash player is about the worst way to manage it. You'll have to manually handle all updates, and Flash is a nasty piece of work that you really should keep up to date, so that you don't suffer an exploit. You've got to know when an update is available, or keep on checking for one yourself.
On the other hand, if you'd installed the appropriate yum repo for your type of computer (32-bit or 64-bit), then any time you do a "yum update" to update all the software on your computer, then *all* the software gets the lastest versions that are available to install. The same applies for when updates are triggered by a GUI telling you that updates are available.