Announcement

Collapse
No announcement yet.

root password

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Originally posted by aria View Post
    I tested the first option (“kwriteconfig...”) and worked with Kuser and Software sources, but gave some inconsistent results in terminal: kdesudo for example still asked and worked with the adm-user password. So, decided to change back the “su” option to “sudo”.
    Yes, this method only changes the default password for the actual kdesu executables, it does not affect kdesudo/sudo password. So this method is only good if you wish to use kdesu (and su in the terminal).

    For a more consistent method, you should use the rootpw method, which also affects sudo/kdesudo.

    Originally posted by aria View Post
    Than tried the second one, by creating a file with “kdesudo kate” in “/etc/sudoers.d” with the command line “Defaults rootpw”. But couldn’t save it, because root directory showed empty.
    That sounds a bit odd, are you sure you were in the real root directory (as in "/") and not in root's home directory (as in "/root/") which may show as empty as it has only hidden files and directories by default? (If you run "kdesudo dolphin" this will open in root's home directory ("/root/") by default...and not in the filesystem root directory ("/"))

    Originally posted by aria View Post
    Opened it, but a second later the process was killed (red tag in dolphin saying: the process for the file protocol died unexpectedly) and the terminal said
    This looks like a dbus bug, but it's a tad odd if it only shows itself when you set the rootpw option.
    Try running dolphin with "kdesudo dbus-run-session dolphin" to see if it works better?

    Originally posted by aria View Post
    Is this because of the 2x“kwriteconfig...” I did before? By changing “sudo” for “su” was something erased that didn’t set back properly after changing “su” for “sudo” again
    Highly unlikely. I can't say this is utterly impossible, but I'm certainly tempted to do so.

    Originally posted by aria View Post
    After reboot (when "kdesudo" worked a single time) added to "/etc/sudoers.d" a file with "Defalts rootpw", and it seems to work better than "kwriteconfig...", I mean it replaced the adm-user paswd in the terminal too, with "kdesudo"
    Yes, this is a more consistent as it also affects kdesudo/sudo and not only kdesu. These will all still use the sudo password, but sudo password is now changed to the root password instead of the admin-user password.

    Originally posted by aria View Post
    Unfortunately the misbehaving of "kdesudo" after the first use after a reboot didn't change.
    Like I mentioned, this bug should be unrelated to setting the rootpw option in sudoers (it should also manifest without it, IMO)...I'd first recommend using the "kdesudo dbus-run-session dolphin" command I mentioned above. And while we are modifying sudo behavior, you could also add another file in /etc/sudoers.d/ (this should improve the behavior of all applications started as root by keeping a few environment variables):
    /etc/sudoers.d/30-mykdesession_env
    Defaults env_keep += "KDE_SESSION_VERSION KDE_FULL_SESSION"
    (This could be useful with or without setting the rootpw option)

    Comment


      #17
      Back again.

      Tried "kdesudo dbus-run-session dolphin" and worked, but only had the result of a reboot. I mean it opens Dolphin when used, even if Dolphin misbehaved before, but when no more used, Dolphin opens normally only the first time.

      Also created the file "/etc/sudoers.d/30-mykdesession_env" with the content:
      Defaults env_keep += "KDE_SESSION_VERSION KDE_FULL_SESSION"
      but when tried to open Dolphin, terminal warned me for a syntax error. Line 11 in the message below is the code's line, because I wrote before it some explanations, each line preceded by # to avoid execution. As I kept a copy of this file in Documents, I could check if all # where there and there were. So, this is the error message:

      >>> /etc/sudoers.d/30-mykdesession_env: syntax error near line 11 <<<
      sudo: parse error in near line 11
      sudo: no valid sudoers sources found, quitting
      sudo: unable to initialize policy plugin

      Don't know what "near" could be, but the code was on line 11. Believe should write Defaults: ... (instead of Defaults ...)

      These being done, I cannot open Dolphin with "kdesudo" anymore, nor can I do it with "kdesudo dbus-run-session...", and the same happens with Kate. Can open the file as a user, but cannot save the correction.

      Solved the issue:
      Code:
      su
      dbus-run-session dolphin
      and deleted "30-mykdesession_env".

      Also corrected what I believed was the error, and tried again. Also deleted all comments leaving only the command line (tried both, with and without ":"). In all cases got the same syntax error message, and when leaving only the command line in the file, message wrote "near line".

      Days later: No syntax correction suggestions. Reinstalled and decided to stay with Kubuntu's default password policy (sudo). Also created a root (su) password for backup.
      Last edited by aria; Nov 13, 2016, 10:41 PM.
      aria

      Comment

      Working...
      X