Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
13
rated 0 times [  13] [ 0]  / answers: 1 / hits: 17151  / 3 Years ago, sun, september 5, 2021, 2:45:37

When I tried to restart the ssh server on my ubuntu box, I got



me@me-one:~$ service ssh restart
restart: Rejected send message, 1 matched rules; type="method_call", sender=":1.63" (uid=1000 pid=3354 comm="restart ssh ") interface="com.ubuntu.Upstart0_6.Job" member="Restart" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init")


I realized that I hadn't sudo-ed



me@me-one:~$ sudo service ssh restart
ssh start/running, process 3386


Why didn't the first attempt throw an error like Permission denied or something similar. Am I overriding the error when running as root and implicitly ignoring the warning/error? Or is it just bad programming by the openssh developers?


More From » root

 Answers
4

One person's "bad programming" may be another person's "it's working as intended".



It's true that you need root priveleges to restart, start, stop etc and you are getting this message because you don't have those privileges. But I agree that it would be nice if the message you got when you tried to do so without root privileges was more helpful.



You may want to check if bugs already exist in launchpad about this (presumably under upstart) and if not, report it. It's the sort of thing, though, where I'd be fairly sure you wouldn't be the first person to notice it since it's so common. Either way, bug research can be rewarding.


[#40091] Monday, September 6, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
oileweaty

Total Points: 337
Total Questions: 108
Total Answers: 105

Location: Western Sahara
Member since Mon, May 3, 2021
3 Years ago
oileweaty questions
Thu, Jul 1, 21, 01:57, 3 Years ago
Wed, Nov 24, 21, 11:48, 2 Years ago
Sat, May 14, 22, 00:50, 2 Years ago
;