Announcement

Collapse
No announcement yet.

Need to enter password in konsole

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

    Need to enter password in konsole

    Hello,
    The question concerns Kubuntu 20.10, but...
    Whenever I start a new sub-window in konsole I keep having to enter my user password. What might be the reason, and - how can I prevent this?
    Thanks for your help
    Regards
    H. Stoellinger

    #2
    What does the prompt for the password look like? Is it a dialogue box, or is it a prompt in the konsole window? In either case, could you tell us the exact wording?

    I'm thinking there's something started by your .bashrc or the like.
    Regards, John Little

    Comment


      #3
      Thanks for the prompt reply!
      - the prompt for the password is presented within the new sub-window and it is: "[sudo] Passwort für hs:"
      "hs" is of course my user-id and I have got sysadmin rights.

      Comment


        #4
        Does it prompt for your password as soon as you open the tab/sub-window or do you mean after you type a sudo command? If it's the second, then that's normal because you started a new konsole session with the tab/sub-window.

        Comment


          #5
          Originally posted by hstoellinger View Post
          - the prompt for the password is presented within the new sub-window and it is: "[sudo] Passwort für hs:"
          You have a sudo command in a startup script, most likely .bashrc but it could be a script run from there, or .profile, or .login, or the startup script for your shell if it's not bash.

          If you really want to run the command with sudo for every konsole session, say xyzzy for example, you could put a file for it, called xyzzy, in /etc/sudoers.d:
          Code:
          hs    ALL=(ALL) NOPASSWD:/usr/bin/xyzzy
          (check the path by running type xyzzy)
          Regards, John Little

          Comment


            #6
            I looked at both .bashrc and .profile (and /etc/profile). There doesn't seem to be anything there that might necessitate entering a sudo-password. I cannot find a .login file anywhere. My shell is bash.

            Comment


              #7
              The text "[sudo]" at the beginning of the prompt comes from the sudo programme. (Or, conceivably, malware stealing your password.)

              I suggest temporarily adding the line
              Code:
              set -x
              as the first, or second if the first starts with "#!", of .bashrc. This will output what bash is doing and it might help track down the culprit.
              Regards, John Little

              Comment


                #8
                Sorry to keep bothering you! I am really "up in cloudy air" here.
                When entering "bash" from an open konsole window, I also get the prompt "[sudo] enter password for...".
                The properies of "bash" are...
                -rwxr-xr-x 1 root root 1183448 Jun 18 2020 /usr/bin/bash
                When setting the access bits to 775, entering "bash" does NOT prompt for the password. However, starting
                an additional sub-window still requires the password.
                I clearly don't understand something elementary there...
                Could I maybe send you the output of putting "set -x" into .bashrc? I looked at it and - again - I cannot find
                anything "fishy" in it.
                Regards
                HS
                Last edited by hstoellinger; Nov 29, 2021, 06:19 AM.

                Comment


                  #9
                  With the set -x output, you'd want to look at what appears just before the sudo prompt.

                  When setting the access bits to 775 does not prompt for the password
                  Weird, I don't understand that. All I can think of is that in the same process group (I'm not sure of the proper term) sudo keeps the password for a while, default 15 minutes I think, and that has made you think the permission bits had an effect. An additional sub-window gets a new process group.
                  Regards, John Little

                  Comment


                    #10
                    Originally posted by hstoellinger View Post
                    -rwxr-xr-x 1 root root 1183448 Jun 18 2020 /usr/bin/bash
                    Weird. On my KDENeon install it's just "/bin/bash". No "/usr/bin/bash" can be found.

                    Please Read Me

                    Comment


                      #11
                      Weird ;·) On my neon,
                      ~$ which bash
                      /usr/bin/bash


                      ls (-la) gives:
                      -rwxr-xr-x 1 root root 1.2M Jun 18 2020 /usr/bin/bash*

                      But (weirder still ;·) I also have
                      -rwxr-xr-x 1 root root 1.2M Jun 18 2020 /bin/bash*
                      neither of which seems to be a symlink.
                      Last edited by Don B. Cilly; Nov 30, 2021, 11:14 AM.

                      Comment


                        #12
                        Code:
                        $ ls -li /usr/bin/bash /bin/bash
                        7734613 -rwxr-xr-x 1 root root 1392424 Oct 7 03:09 /bin/bash*
                        7734613 -rwxr-xr-x 1 root root 1392424 Oct 7 03:09 /usr/bin/bash*
                        The "i" option to ls adds the inode number to the output. This shows that /bin/bash and /usr/bin/bash are pointing to the same contents on disk. They are hard links.

                        Comment


                          #13
                          Interesting - and still weird. So my install does not have the hard link to /usr/bin/bash.

                          I wonder if it's a resent addition or if some other program adds the link.

                          Please Read Me

                          Comment


                            #14
                            Originally posted by oshunluvr View Post
                            Interesting - and still weird. So my install does not have the hard link to /usr/bin/bash.

                            I wonder if it's a resent addition or if some other program adds the link.
                            My KDE neon User Edition has both, /usr/bin/bash and /bin/bash.
                            Windows no longer obstructs my view.
                            Using Kubuntu Linux since March 23, 2007.
                            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                            Comment


                              #15
                              Yes, weird!
                              In my situation there are symbolic links like this:
                              lrwxrwxrwx 1 root root 7 Okt 25 2020 bin -> usr/bin
                              lrwxrwxrwx 1 root root 8 Okt 25 2020 /sbin -> usr/sbin
                              Might this be "fishy"?
                              In any case, I seem to have found the "culprit" for always asking for the password when starting new konsole sub-windows.
                              I had the following in my /etc/bash.bashrc:
                              sudo ip link set wlp5s0 down
                              commenting the line out - things work as I want them to work.
                              There is one other issue, though:
                              When I start konsole from the task bar TWO windows are created - one with the normal prompt, the other one with NO prompt at all.
                              Konsole is NOT autostarted at boot time.
                              Thanks for contributing your time...
                              Regards from snowy Salzburg and - don't let Covid get at you
                              H. Stoellinger

                              Last edited by Snowhog; Nov 30, 2021, 01:53 PM.

                              Comment

                              Working...
                              X