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.
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
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
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”)
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>
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)
Am 11.02.2012 04:55, schrieb Jim Henderson:
> 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 is absolutely exactly NOT what I suggested, I suggested
sudo /usr/sbin/rcpostgresql start
> That won’t actually work if the current directory isn’t in your path.
>
of course not
> Try (from that directory)
>
> sudo ./rcpostgresql start
>
> That should work. Sudo is on your system and is working fine.
>
> Jim
>
>
>
–
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
The problem was solved.
It was me the “culprit,” who did syntax error while issuing “sudo” command in first place.
Corrected after suggetion from Martin and Carlos, it is now working fine.