Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: 'sudo' command not found in console of OpenSuse 12.1

  1. #1
    Join Date
    Jul 2008
    Location
    Ottawa, Ontario
    Posts
    81

    Default 'sudo' command not found in console of OpenSuse 12.1

    Hi:
    I just started using OpenSuse 12.1 (upgraded form DVD, 11.3 to 12.1).
    Everything was working fine.

    Yesterdy, while working with PostGreSQL and OpenERP configuration from the console, suddenly, I found that "sudo" command is not working.
    When I issue a sudo command (e.g. a command to start the PostGreSQL server: "sudo rcpostgresql start", which was working before suddenly returns "sudo command not found")

    I restarted the machine, no luck yet.
    Note, my YAST refresh/update from OpenSuse OS repository is enabled.

    Any idea ?

  2. #2

    Default Re: 'sudo' command not found in console of OpenSuse 12.1

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    Become root another way and try to install it, perhaps? My 12.1 system
    has it so I'm not sure why yours does not:

    su -
    zypper in sudo

    Good luck.
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.18 (GNU/Linux)
    Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

    iQIcBAEBAgAGBQJPNZIeAAoJEF+XTK08PnB5gRYP/RSXtWrKqbLUrqwIxPLBT7Lf
    Gh8Jwepse0dPrM52txOxx4BjprfMgFiqJgoRv3+EL3wdukFBBF2SKHp5aA45Yymc
    VDLloSXMAMHp5Gt5wtjlzgLJAjzglgiGF18PVDg9Ef8DSrqE/UDvP55E8tZRNXkp
    IPhdsi98Inv/n+vW8zgAkne6E5rh5daMeQgwelX7pfLoLvVg81TbQ9AwieQunyMh
    uSrWI3c5RmVnQ8ZpCx2X579XlaN+vI+hSjsRN1frpLNM//ZBNMjjdKsp8uQaPg35
    9CEmIljNcxMDgCjv1CPwEp3TaOlJuykqBkB9E9KWLikSZgyhchhmjRbymKennxT5
    Q/EhI5j9ASnCo0sOaF+jJhg9E1/hgXr1U9yYGqI/+gE/U9hOEnxuHo5Jr3zrzbdI
    AQSlehqm3TqwVsBINB6f9Je5uk++Ce+JypQYjCt1s0PSBlhsNy+hTOFcMpBAqUnA
    p0vI6vppeZ1/47ooFeK7NOeVvvxti4zWhZgIUeYat9QWMnBPn3r/JLKHP5QE55Vc
    SxkXBkaPZw7P57hXeiQro+54678ZEDJsQTU5Jqh2hASJxgyBydyzLVm+/vU0D0oN
    84t9FaRZW+bksRSwWmSNivW7ibj1Gytg1OmlpCJr32P8QxodLM6BD9q/QYm4iHGG
    RZQynVdah/0SzMswxjno
    =vX1g
    -----END PGP SIGNATURE-----

  3. #3
    Join Date
    Sep 2008
    Location
    Sulzbach (Taunus), Hessen [Hesse], Deutschland [Germany]
    Posts
    2,178

    Default AW: 'sudo' command not found in console of OpenSuse 12.1

    Quote Originally Posted by jrahman View Post
    Hi:
    I just started using OpenSuse 12.1 (upgraded form DVD, 11.3 to 12.1).
    Everything was working fine.

    Yesterdy, while working with PostGreSQL and OpenERP configuration from the console, suddenly, I found that "sudo" command is not working.
    When I issue a sudo command (e.g. a command to start the PostGreSQL server: "sudo rcpostgresql start", which was working before suddenly returns "sudo command not found")

    I restarted the machine, no luck yet.
    Note, my YAST refresh/update from OpenSuse OS repository is enabled.

    Any idea ?
    I would first try to locate sudo (or the problem) by asking:
    Code:
    whereis sudo

    Regards
    Martin

  4. #4
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: 'sudo' command not found in console of OpenSuse 12.1

    On 2012-02-10 22:36, jrahman wrote:


    > Any idea ?


    I would prefer to see a copy paste from your terminal, including the
    command prompt before and after. Ie, complete. Your explanation is not enough.

    Please paste using code tags. Advanced editor, '#'. If you don't know what
    I'm talking about, ask, do not paste.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

  5. #5
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,654

    Default Re: 'sudo' command not found in console of OpenSuse 12.1

    Am 10.02.2012 22:36, schrieb jrahman:
    > sudo rcpostgresql start

    This will and cannot work, I am pretty sure sudo is installed on your
    machine, but sudo does not add by black magic /sbin and /usr/sbin to
    your users PATH.

    If you run with sudo you need to do it the correct way
    Code:
    sudo /usr/sbin/rcpostgresql start
    or use "su -" as already suggested by Carlos.

    --
    PC: oS 11.4 (dual boot 12.1) 64 bit | Intel Core i7-2600@3.40GHz | KDE
    4.6.0 | GeForce GT 420 | 16GB Ram
    Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.8.0 |
    nVidia ION | 3GB Ram

  6. #6
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,654

    Default Re: 'sudo' command not found in console of OpenSuse 12.1

    Am 10.02.2012 23:45, schrieb Martin Helm:
    > or use "su -" as already suggested by Carlos.


    correction: as suggested by ab

  7. #7
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: 'sudo' command not found in console of OpenSuse 12.1

    On 2012-02-10 23:45, Martin Helm wrote:
    > This will and cannot work, I am pretty sure sudo is installed on your


    True, but sudo is usually more verbose and adds punctuation. That's why I
    want to see the full text copypaste.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

  8. #8
    Join Date
    Jul 2008
    Location
    Ottawa, Ontario
    Posts
    81

    Default Re: 'sudo' command not found in console of OpenSuse 12.1

    Martin suggested me to be in the directory /usr/sbin before issue the command,
    Carlos wanted to see the text from console,
    here is what I did and what I get.
    (Trust me it was working, but suddenly appearing the "command not found")
    Code:
    jrahman@linux-z583:/usr/sbin> pwd
    /usr/sbin
    jrahman@linux-z583:/usr/sbin> ls -rtl rcpostgresql
    lrwxrwxrwx 1 root root 22 Feb  5 23:01 rcpostgresql -> /etc/init.d/postgresql
    jrahman@linux-z583:/usr/sbin> sudo rcpostgresql start
    sudo: rcpostgresql: command not found
    jrahman@linux-z583:/usr/sbin>
    also here is the sudo in my system:
    Code:
    jrahman@linux-z583:/usr/sbin> whereis sudo
    sudo: /usr/bin/sudo /usr/lib/sudo /usr/bin/X11/sudo /usr/share/man/man8/sudo.8.gz
    jrahman@linux-z583:/usr/sbin>

  9. #9
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    17,037

    Default Re: 'sudo' command not found in console of OpenSuse 12.1

    On Sat, 11 Feb 2012 02:26:02 +0000, jrahman wrote:

    > Martin suggested me to be in the directory /usr/sbin before issue the
    > command


    That won't actually work if the current directory isn't in your path.

    Try (from that directory)

    sudo ./rcpostgresql start

    That should work. Sudo is on your system and is working fine.

    Jim



    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

  10. #10
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: 'sudo' command not found in console of OpenSuse 12.1

    On 2012-02-11 03:26, jrahman wrote:
    >
    > Martin suggested me to be in the directory /usr/sbin before issue the
    > command,


    No, he did not say that, read it again. Being in /usr/bin has no effect in
    Linux for finding commands.

    > Carlos wanted to see the text from console,
    > here is what I did and what I get.
    > (-Trust me it was working, but suddenly appearing the "command not
    > found"-)
    >
    > Code:
    > --------------------
    >
    > jrahman@linux-z583:/usr/sbin> pwd
    > /usr/sbin
    > jrahman@linux-z583:/usr/sbin> ls -rtl rcpostgresql
    > lrwxrwxrwx 1 root root 22 Feb 5 23:01 rcpostgresql -> /etc/init.d/postgresql
    > jrahman@linux-z583:/usr/sbin> sudo rcpostgresql start
    > sudo: rcpostgresql: command not found
    > jrahman@linux-z583:/usr/sbin>
    >
    > --------------------


    Thanks. This text shows what I thought and Martin said. It is not that sudo
    is not found, but it is sudo who says that the command "rcpostgresql" is
    not found. That's the meaning of the colon. So, you have to type the full
    path to "rcpostgresql", because that's a superuser command and you are just
    a plain user. No, sudo doesn't look into the list of root's commands.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 11.4 x86_64 "Celadon" at Telcontar)

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •