Confirmation dialogue instead of root password for system actions

On Mon, 24 Sep 2012 21:16:01 GMT, MirceaKitsune
<MirceaKitsune@no-mx.forums.opensuse.org> wrote:

>
>Thanks for those clarifications. True, I know Windows and Linux are
>different. My reflex to compare them is due to the fact I’ve used only
>Windows for 17 years, and last week is the first time I actually
>switched over to Linux (even if my PC is dual-boot with openSUSE for 5
>years). I learned computers by myself as I grew up (since the Windows 95
>times), so it’s not surprising if I might not understand some concepts
>and how Linux always worked. I usually tend to be concerned with
>everything looking good and working well, hence why I didn’t think
>writing your root password after logging in would be important.
>
>I was wondering if it’s safe to forget a Yast window open. I
>occasionally leave terminals open as well after using the su command…
>never thought that might be dangerous. I’m rather paranoid about
>breaking my system, specifically “being stuck with a console I don’t
>understand anything from during the boot splash screen” which is my
>nightmare. So I totally don’t wanna do anything that would cause damage
>hard or impossible to repair.

Welcome to the Linux / Unix world.
I started with computers in 1972, before there was PCs, DOS, and many
other more modern things. The old computers i first worked with were
built with transistors and core memory. It was my job to fix them when
they broke. You may well be able to fill in the rest.

?-)

On Mon, 24 Sep 2012 23:16:01 GMT, MirceaKitsune
<MirceaKitsune@no-mx.forums.opensuse.org> wrote:

>
>robin_listas;2490214 Wrote:
>> On 2012-09-24 23:16, MirceaKitsune wrote:
>> Depends. Some people are more careful than others. Me, I always keep
>> one or two root’s
>> terminals. The danger is forgetting that the terminal runs commands as
>> root, and that will
>> eventually happen. And it does happen.
>>
>> –
>> Cheers / Saludos,
>>
>> Carlos E. R.
>> (from 12.1 x86_64 “Asparagus” at Telcontar)
>
>Thankfully when root, the text to the left of the cursor (showing the
>user name) is bold and red, so it’s a visible reminder you’re on root.
>So far I was never even close to risking a harmful command by mistake…
>I hope it won’t happen either.

I never did serious damage to a system until i had a lot of experience,
many years. Of course after over a decade of linux experience i have
finally managed to trash one of my systems so thoroughly that not even a
reinstall fixed it, i had to add a restore for /home to that.
There i go, telling on myself again.

?-)

Now I’m kinda worried with so many people saying “sooner or later you’re going to do something to damage your system” :stuck_out_tongue: In order to setup openSUSE properly, I have to poke into dangerous stuff occasionally, but I try to be extra careful. Today for instance, I discovered that grub2 is now default in openSUSE 12.2, and I still had grub from my 12.1 setup. So I upgraded my grub slowly and carefully, and even so had to debug a small inconvenience I couldn’t yet fix. The risk of messing something up was high, but I don’t want to remain behind the default standards.

And I don’t do a lot of tasks that require root. I only need root when entering Yast and the software manager (sometimes it doesn’t ask again until next login) or editing files and folders that belong to the system (when I have to mess around with the advanced stuff). To be honest that isn’t a lot, so no real reason for me to complain honestly.

On 09/26/2012 10:26 PM, MirceaKitsune wrote:
> Now I’m kinda worried with so many people saying “sooner or later you’re
> going to do something to damage your system”

i think you have maybe lost sight of where this thread has been: you
began by explaining that you don’t want to have to type the root
password because it is not needed for your home computer…only you
use it and therefore there is no need to have both a root and you…

so we tried to explain why that is a false ‘reason’ to make it easy to
not type a password for root…

and, now you say you are afraid you will mess up as root, when before
you wanted to be able to do everything without having to type a password…

think about it: at the very least having to type a password reminds
you that you ARE about to do something which may cause system wide
damage…

something that you, as a regular user, can’t do…sure you can shoot
your desktop, but not the entire system…

so if you, as the user, shoot your desktop environment the old Win trick
of reinstalling the whole system is no longer a useful option…just fix
the desktop whose configs lives in your /home everything outside of
your /home should still be fine and dandy…no reinstall is gonna help.
(unless you also format /home and start completely over…and loose all
your photos, music, video etc etc etc etc)


dd

When I asked, I didn’t know how much not having to type in your root password could risk damaging the system. It’s not something that feels like a risky factor by itself, since if you plan to do something that could damage your computer you do it either way, whether you have to type your root password or not. The important part would be knowing what actions specifically can cause the damage. But I’m still new, and users with more experience know best why it’s safer (as for instance normal users might unknowingly write bad commands and damage things that way).

I like it that all program settings are stored in the /home/[user]/ folder. Slightly similar to Windows 7 where configurations are usually put in C:/Users/[username]/AppData/Roaming/. Working with individual applications doesn’t risk doing damage to the system this way, specifically that would cause a boot block.

I have only one more comment to repeat: you should stop comparing things with Windows. It will bar you from understanding things that would otherwise be very logical. It will blindfold you. Forget as much about Windows as you can, read about Unix/Linux and try to deepen your understanding by seeing the logics behind it. Then you will also see were the weak pointa are (there are).

Linux is not Windows. The moment you succeed to reinvent your openSUSE to a “Win7 with a linux kernel” you’ll have crossed all the lines that make linux stable and safe, so do yourself a favor and stop trying. Leave Windows where it is, start learning linux by using it for your daily tasks. You’ll find that you don’t have to be root to get things done. If something doesn’t work the way you expect it to, don’t try to bend it, try to find out how it works. Because it does. :slight_smile:

Ordinary care is usually sufficient to keep the risk low.

Don’t do anything as root that you could do as an ordinary user.

Avoid using complicated programs (desktops, browsers, GUI mail clients) as root to the extent possible. You may occasionally need to run a GUI software installer, but keep that kind of use to a minimum.

Thanks. I can see your points, and it’s fair enough. Trying to make openSUSE be exactly like Windows would be crazy, and indeed a good way to bar yourself from understanding how it works as well as breaking something. However, I do try to get it looking and working closely to it in parts where I want it to be similar. One of the reasons I chose openSUSE + KDE is how easily it could be configured to be alike to Windows 7 (not a main reason). But after I’ve been with Windows since I was 5 years old (currently 23), it’s not possible to fully erase everything from my mind about how Windows works and learn openSUSE all-new :slight_smile:

Making them alike involves small things though… such as having icons on my desktop, trying to make the session lock look more closely like the windows logon screen (with screensavers and widgets though both are broken), etc. Actual functionality is good as it is for the most part, and I wouldn’t mess around with that to make it like Windows. The root password was an exception since writing it occasionally can get annoying, but in the long run I cannot complain.

On 09/27/2012 04:56 PM, MirceaKitsune wrote:
> screensavers and widgets though both are broken

as far as i know screensavers and widgets are not broken…a few of the
screensavers do strange things sometimes, on some systems with some
video cards…if you find one of those that is bad with your hardware,
then log a bug.

otherwise, if you have screensaver and widget problems, then start a new
thread on each problem…with a good subject…


dd

I’ll probably start a new thread for this later. Some screensavers are broken (as in not doing what they should, like the media screensaver) while some cause the unlock window to not show when moving the mouse (like the openGL ones). I also can’t resize widgets at all for the lock screen… but for now I need to get the other stuff working right too.

On 2012-09-27 13:06, MirceaKitsune wrote:
> I like it that all program settings are stored in the /home/[user]/
> folder.

Not all :slight_smile:

There are defaults and system configurations stored in /etc/something.

> Slightly similar to Windows 7 where configurations are usually
> put in C:/Users/[username]/AppData/Roaming/. Working with individual
> applications doesn’t risk doing damage to the system this way,
> specifically that would cause a boot block.

Similar problems, similar solutions :slight_smile: . But Linux did this first, inherited from Unix.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

On 2012-09-27 16:56, MirceaKitsune wrote:
> But after I’ve been with Windows since I
> was 5 years old (currently 23), it’s not possible to fully erase
> everything from my mind about how Windows works and learn openSUSE
> all-new :slight_smile:

No, it is not. I do think you can create parallels between both worlds, but don’t expect too
much of it, because sometimes you think something is the same, and it is hugely different. It
is a “false friend” (expression taken from language teaching).

Examples.

In MSDos (and Win shell) you do “dir .” to list all files. In Linux that works… but it is
not the same even if it looks the same, because the first asterisk already matches all files in
the current directory, the rest of the mask is irrelevant. The Linux shell has no knowledge of
extensions at all (which is why you can have extensions of any length).

In fact the combination “.*” has a different meaning here, “regular expressions”. I will not go
in details because the subject still confuses me. IIRC it means “any one char” (only one).

Further, getting inside the command.

In MSDos world, if you make the call “program .” the program has to interpret the first
parameter it gets, the “.” and call the getfirst and getnext functions to retrieve all the
file names that match the expression.

In Linux, if you make the equivalent call “program *”, the program gets the asterisk already
expanded in all the files that match the expression, even if it is a million filenames (it
would get a million parameters). In fact, the call would get unexpected results because the
command line has a limit of 64 KiB.

If you need the program to get the asterisk you have to “escape” it.


Cheers / Saludos,

Carlos E. R.
(from 12.1 x86_64 “Asparagus” at Telcontar)

Yeah, I can see the difference there. Especially since in Linux extensions are unnecessary from what I read (still learning about mime types) so * should be used instead of .. The small differences I am starting to learn slowly, and hopefully in a few months I’ll learn what I can separate and what not. But again, if something can be done to look and work similar to Windows in a legit way (not by hacking the system and doing something bad) there’s no sin in that :slight_smile: