Page 1 of 1

[SOLUTION]How to log in as root for Mageia

PostPosted: Jun 6th, '12, 21:20
by zxr250cc
HOW TO LOG IN AS ROOT FOR WORK ON YOUR SYSTEM IF YOU PREFER THIS TO sudo or su- use...
Type the following to get kwrite to work as root:
su -
(your root password)
kwrite
Then open and edit this file: /var/lib/mageia/kde4-profiles/Default/share/config/kdm/kdmrc

Look at the kdmrc file and find the command line in [X-*-Core] saying AllowRootLogin=false
Change false to true (AllowRootLogin=true)
save the file.
Exit kwrite
Log Out, then Log in as root with root as user then your root password. Do work as root. Log out and use normal permission as a regular user for normal use.

ENJOY! I thought this could be nicer than one of my 'root rants' from prior times! :shock:

Cheers,

gcd

Re: How to log in as root for Mageia

PostPosted: Jun 7th, '12, 13:00
by marja
zxr250cc wrote:Log Out, then Log in as root with root as user then your root password.

gcd



Of course, you do this at your own risk :twisted:

That we don't allow this by default has a very good reason: human beings tend to forget they're logged into their DEs as root, when they are, and thus to screw things up.
I suggest setting the background to an alarm-red colour ;)

Re: How to log in as root for Mageia

PostPosted: Jun 7th, '12, 17:02
by zxr250cc
If you really want the best effect then lift the old SUSE admin/root background image with bright red background and lit fuse old style bombs all over it. :shock:

Did you actually read my post carefully or merely knee jerk react to the idea of logging in as root? [Log in as root with root as user then your root password. Do work as root. Log out and use normal permission as a regular user for normal use.] I cautioned users about it and told them to use normal permissions for daily use. I was trying to avoid a flame war while offering information. Perhaps you read some of my posts about this in another forum somewhere?

Many users of SUSE and other distributions have been using Linux for more than a decade with the free chance to log in as root anytime they wish with no problems at all. The M distributions seem to feel the 'nanny need' to restrict this. Fine, you collectively made that restrictive choice prior to release of the software. I have merely offered information to allow someone to do maintenance on the system without value judgements as to whether they should do so or not. I have had instances in the past with problems that only could have been fixed if I had set the system up to let me log in as root. The problems would have required a complete reinstall if I had not been able to log in as root. So, I offered this information to allow thinking people to freely choose to make a free choice decision about their wish to use the computer they own with the software they downloaded.

I honestly believe that many users in the M forums forget that the bulk of the users of this software are desktop users who are using stand alone computers or laptops, I think, and not being controlled by an administrator in a network at a business somewhere who needs to keep the system controlled to keep it safe. Germ and I have danced verbally around this idea in the past in other places in a free debate without rancor. We choose to disagree on this. I mention the word free a lot here because I view this as a free choice. Many others disagree. You are free to do so. :shock:

Your mileage may vary...

gcd

Re: How to log in as root for Mageia

PostPosted: Jun 7th, '12, 18:02
by marja
zxr250cc wrote:Did you actually read my post carefully


Yes, I read it very well.

I know many people, including me, who would need to be reminded by having that red background. Not that I would forget it every time, but once in a while is bad enough.

Apparently your memory works great and you never work in distracting circumstances. In my eyes you're one of a happy few. I hope you'll enjoy the luck you have and that it'll last very long :)

Re: How to log in as root for Mageia

PostPosted: Jun 7th, '12, 18:42
by zxr250cc
I use normal permissions for almost all use of Linux of any flavor. I use root for system work only. Please do not make the assumption or imply to others that I am only working as a root user constantly. I have done that in the past, over five years back in time, for a period of several years without any problems of any sort but do not recommend it or choose to do that now with any Linux I use. I use normal user permissions for the additional SECURITY they add to the regular settings in daily use of Linux. I use root to work on the system. I have mentioned that twice now in response to saying it in the beginning when mentioning preference for root over su or sudo use.

It is the choice to try to refuse being able to log in as root use that I philosophically disagree with, not the need, preference or requirement to work as a normal user. I also mentioned it because of my thinking that the bulk of the Linux desktop users are not in a network system with an administrator but using stand alone computers that they personally own, maintain and control for the choice of software, security and updates made by them. If users mess it up they have learned something new about Linux. They will progress and learn to be more careful. Denying default root use is a restrictive choice that the M distributions make and I live with it by editing the correct file to make MY choice for system administration use as root.

Have you never had a system that could not be recovered unless you could log in at a command line as root to fix it? That happened TWICE to me with normal user use of another M Linux flavor in the last three years. Nothing is perfect and allowing for a way to recover from a disaster of some sort makes sense to me. This is all predicated on the idea of stand alone use with no system administrator available but the user themselves. I know Germ looks at it from an admin viewpoint as he should with his work. Perhaps you are also doing work like this. I am not. If software won't let me log in my only recourse would be to wipe the drive and start over. I refuse to accept that idea: I edit the kdmrc file for root use and then I don't worry about it.

Thanks for the reply,

gcd

Re: How to log in as root for Mageia

PostPosted: Jun 8th, '12, 02:57
by ghmitch
I *always* open up access to root desktop. Its one of the first things I do on any of my systems. But I'm an old Unix admin and I know the ropes. As such, I think that marja's suggestion is a good one. It used to be that a red background was the default for root desktop. Then they came up with the momentary red flash. I really DO think that a red background *should* be the default. I used it that way for a long time and I wouldn't change it. But if it were the default, the user could change it to whatever they wanted. Those who don't know how to change it, probably shouldn't. So I'm glad to see the tip here on root desktop access AND I am glad to see the discussion that follows. - George

Re: How to log in as root for Mageia

PostPosted: Jun 8th, '12, 03:13
by zxr250cc
I set the mouse cursor to RED so it is a visual reminder and it shows up very nice on the desktop. The old SUSE red with bombs root desktop is the most dramatic I have seen. It could be used in here if they chose to do so since it is of course available for anyone wishing to change the background.

At least the info is available in here now for anyone wishing to make the change to enable root system work or recovery.

Cheers all,

gcd

Re: How to log in as root for Mageia

PostPosted: Jun 8th, '12, 08:26
by marja
zxr250cc wrote:I set the mouse cursor to RED so it is a visual reminder and it shows up very nice on the desktop.
gcd


That is a nice tip, thanks :)
The red background can be covered, but the mouse cursor never gets covered ;)

Re: How to log in as root for Mageia

PostPosted: Jun 8th, '12, 21:51
by doktor5000
Mind to mark the thread as [SOLUTION] by editing the title of the first post, for better clarity?

FWIW, i also do system administration tasks quite often, and never needed a graphical login as root for that ;)
But no hard feelings, everything important has already been written.

Re: [SOLUTION]How to log in as root for Mageia

PostPosted: Aug 19th, '12, 21:39
by maat
moved to "The magician suggest..." as asked :)

Re: [SOLUTION]How to log in as root for Mageia

PostPosted: Aug 20th, '12, 18:54
by zxr250cc
I am quite surprised to become a sticky note that will be easy to find. :shock:

Thanks!

cheers,

gcd

Re: [SOLUTION]How to log in as root for Mageia

PostPosted: Sep 1st, '12, 17:20
by lemonzest
Why would you ever log in as root from KDE/GNOME/etc?

Do this instead

add yourself to the wheel group
then

su
visudo
and move down to where it says

# %wheel

and press I to go into insert mode then delete the # and the space, then hit esc and then issue :wq and then log out and in, then you can use sudo blah to do things as root quickly and safely.

Lemonzest :geek:

Re: [SOLUTION]How to log in as root for Mageia

PostPosted: Jun 14th, '17, 21:04
by goprisko
I agree with the author. Those of us with many years of experience were conditioned to use su and sudo for system maintenance vs logging in as root.

Some child in the Mageia software team made it his mission to frustrate this.

Some other child made it his mission to set permissions for /usr/lib/cups to 777 for all backend and filters files. This infant is so obsessed with this that he wrote scripts
which revert the permissions on boot.

Only one minor problem! CUPS refuses to write to the printer when the permissions are set thus. This specifically means that to use my Brother printer, after eacn and
every boot, I must manually set /usr/lib/cups permissions to 755, so the printer works!

Do you think anyone could find this child and his code, and comdemn both to oblivion??? Never to be seen or heard from again???

INDY

Re: [SOLUTION]How to log in as root for Mageia

PostPosted: Jun 15th, '17, 11:19
by xboxboy
Each to their own, but one of the very first things I do is install colorprompt, makes the root prompt bright red.

The few times I need a GUI root tool I simply 'Alt + F2', then 'kdesu $appname', usually dolphin for when I'm trying to browse an apache folder or such.

now... looking up suse root wallpaper.........

Re: [SOLUTION]How to log in as root for Mageia

PostPosted: Jun 15th, '17, 11:50
by goprisko
I have two objectives:
a. print documents
b. perform systems maintenance in a terminal window

I don't use GUI apps or logins for maintenance

I want su and sudo activated PERMANENTLY !!!!

INDY

Re: [SOLUTION]How to log in as root for Mageia

PostPosted: Jun 15th, '17, 19:30
by doktor5000
goprisko wrote:Some child in the Mageia software team made it his mission to frustrate this.

Some other child made it his mission to set permissions for /usr/lib/cups to 777 for all backend and filters files. This infant is so obsessed with this that he wrote scripts
which revert the permissions on boot.

Only one minor problem! CUPS refuses to write to the printer when the permissions are set thus. This specifically means that to use my Brother printer, after eacn and
every boot, I must manually set /usr/lib/cups permissions to 755, so the printer works!

Do you think anyone could find this child and his code, and comdemn both to oblivion??? Never to be seen or heard from again???

That is a pretty mature way to adress such accusations. As you don't provide any bugreport probably nobody will find any child and condem some code to oblivion.

And I cannot reproduce, only thing below /usr/lib/cups on a regular mga5 install are symlinks - which always have 777 permissions by design.

Code: Select all
[doktor5000@Mageia5]─[19:24:46]─[~] sudo find /usr/lib/cups -perm -777 -ls
  8423    4 lrwxrwxrwx   1 root     root           26 Dez  6  2014 /usr/lib/cups/backend/smb -> /etc/alternatives/cups_smb
3810713    4 lrwxrwxrwx   1 root     root            3 Okt 20  2015 /usr/lib/cups/backend/http -> ipp
3810714    4 lrwxrwxrwx   1 root     root            3 Okt 20  2015 /usr/lib/cups/backend/https -> ipp
3810716    4 lrwxrwxrwx   1 root     root            3 Okt 20  2015 /usr/lib/cups/backend/ipps -> ipp
3810718    4 lrwxrwxrwx   1 root     root            5 Okt 20  2015 /usr/lib/cups/backend/mdns -> dnssd
4805902    4 lrwxrwxrwx   1 root     root           29 Mai 24 20:05 /usr/lib/cups/backend/smb3 -> ../../../../usr/bin/smbspool3
3811330    4 lrwxrwxrwx   1 root     root           36 Apr 17  2015 /usr/lib/cups/driver/foomatic -> ../../../../usr/bin/foomatic-ppdfile
3810740    4 lrwxrwxrwx   1 root     root           13 Okt 20  2015 /usr/lib/cups/filter/rastertodymo -> rastertolabel


Even verified all files in all packages that contain files below /usr/lib/cups and the only files where something deviates from the default are configuration files, cache and spool

Code: Select all
[doktor5000@Mageia5]─[19:17:24]─[~] sudo rpm -V $(rpm -qf $(sudo find /usr/lib/cups -type f) | sort -u)
.......T.  c /etc/cups/cups-files.conf
......G..  c /etc/cups/cupsd.conf
......G..  n /etc/cups/ppd
......G..  n /etc/cups/ssl
.M....G..    /var/cache/cups
......G..    /var/spool/cups
......G..    /var/spool/cups/tmp
......G..  c /etc/cups/cups-browsed.conf


So you should probably find out what's wrong about your installation and do some proper troubleshooting first before throwing around such accusations, and that in a thread where it doesn't even fit the topic.