smxi cannot start in VPS
ckosloff
Status: Contributor
Joined: 21 Dec 2011
Posts: 292
Location: South Florida
Reply Quote
I created a VPS.
For security reasons they recommend to disallow root logins, so I tried to execute following instructions.
smxi.zip has already been inflated in correct location.
This is error message that I get:
:: Code ::

------------------------------------------------------------------
Error No: (8) Do not use sudo to start this script.
Please start smxi as root user, or with 'sudo su -' (note the '-')
then run the smxi start command.
smxi cannot continue. Exiting now.
------------------------------------------------------------------

ckosloff@Iky:/usr/local/bin$ sudo su -smxi
Cannot execute mxi: No such file or directory
ckosloff@Iky:/usr/local/bin$ sudo su - smxi
No passwd entry for user 'smxi'
ckosloff@Iky:/usr/local/bin$


So I tried becoming root.
:: Code ::

ckosloff@Iky:/usr/local/bin$ sudo su
root@Iky:/usr/local/bin# smxi

------------------------------------------------------------------
Error No: (8) Do not use sudo to start this script.
Please start smxi as root user, or with 'sudo su -' (note the '-')
then run the smxi start command.
smxi cannot continue. Exiting now.
------------------------------------------------------------------

root@Iky:/usr/local/bin# -smxi
bash: -smxi: command not found
root@Iky:/usr/local/bin# - smxi
bash: -: command not found
root@Iky:/usr/local/bin#

Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4075
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
Follow the explicitly clear directions on the error message. When you receive directions to execute a command, do NOT then add on more than you were told to execute, that will always result in failure.

I can't make it any more clear but I"ll reiterate:

:: Code ::
# become root:
sudo su -
## hit enter, type:
smxi
# hit enter.


The command is NOT sudo su - smxi, and nowhere in the error message did it suggest it was.

Nor is there any command: -smxi nor were there any directions saying to type that, so that's just some creative winter solstice stuff you came up with to I assume celebrate the solstice.

I'm glad to see the new sudo / sudo su block is working as expected, by the way. And had you tried sudo su - you should have probably found that also works, though sgfxi/smxi will also tell you and log that sudo su - was used to become root. I'm leaving it detected but allowed for now so I can see if any weird issues come from using that, but none should.

A weird string of errors have been reported over the years, and finally someone from mint, the first person ever, not only found how to work around the error he got, but also posted his discoveries here, which let me finally fix that long standing start with sudo su or sudo error.
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4075
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
Actually, reading the error message, I see there is a small space for misinterpreting them, so I'll make them even more explicit.

I've updated sgfxi/smxi to be even more explicit in the error message for sudo/sudo su starts.

:: Code ::
Error No: (8) You cannot start smxi with sudo. Please start smxi
properly as root (use either 'sudo su -' (note the '-' at the end)
to become root, or login as root directly). If 'sudo su -' does not
work, please let the smxi maintainer know, and if your system
has root locked (why would anyone do that?) then you will have to
unlock root, but for most cases 'sudo su -' should work.
After you are root, then start smxi.

Typical signs of sudo failures are respawnings of your desktop while
smxi is running, or failures to create directories.

smxi cannot continue. Exiting now.


Discovering this problem, by the way, helped me avoid years of lost time caused by never followed through bug reports, bugs that were it turns out caused directly by sudo permission issues with sudo smxi, or sudo sgfxi, or sudo su starts.
Back to top
ckosloff
Status: Contributor
Joined: 21 Dec 2011
Posts: 292
Location: South Florida
Reply Quote
I will test your new build on the VPS and let you know.
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4075
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
there's no changes in smxi/sgfxi, I only changed the error message since apparently it wasn't explicitly clear enough to be, well, clear enough so someone reading it would not do what you did.

However, the error message is in this case a very core part of the changes, because I want to make absolutely sure that smxi/sgfxi are never run as sudo anything, except sudo su -, because those sudo caused bugs have cost me untold lost hours over the last years, and, of course, people who are trained to use sudo for everything generally are very very bad bug reporters, almost by definition.

That was my experience anyway, though the guy who did post the last good bug report was a strong exception to that rule, and did everything perfectly in terms of always responding with test data etc when asked, but as they say, it's the exception that proves the rule.

But the error message is designed for someone who has no idea of anything, and is just sudoing everything, and probably isn't even aware that this might have undesirable consequences.
Back to top
ckosloff
Status: Contributor
Joined: 21 Dec 2011
Posts: 292
Location: South Florida
Reply Quote
Still didn't test sudo su -
Logged into the VPS as root and installed smxi.
Still problems when attempting to run:
:: Code ::

------------------------------------------------------------------
Error No: (7) smxi cannot locate any /boot/grub/ config files. Unable to continue.
smxi requires grub config files: /boot/grub/menu.lst or /boot/grub/grub.cfg
smxi does not support lilo or unmounted /boot partitions.
You can start smxi with option: -! 32 to override this at your own risk!!
smxi cannot continue. Exiting now.
------------------------------------------------------------------

root@li318-147:/usr/local/bin# smxi -! 32
==================================================================
Testing internet connection....
Internet connection is present and working.
pcilib: Cannot open /proc/bus/pci
lspci: Cannot find any working access method.

smxi can run like this but I never installed anything with it, except for the dist-upgrade.
Back to top
techAdmin
Status: Site Admin
Joined: 26 Sep 2003
Posts: 4075
Location: East Coast, West Coast? I know it's one of them.
Reply Quote
"Still didn't test sudo su - "

There's nothing to 'test', that's how it works if you don't have root login. No idea how you would have started smxi without that to be honest.

As for unmounted boot, since kernel installs will fail, along with various other stuff, I decided long ago to not support systems without /boot mounted.

Of course, all you have to do to get your boot mounted is, well, to mount /boot, assuming the vps has those privileges, I can't say, it either does or doesn't.

As for lspci failing, no idea, it's your system, you'll need to figure out what works and what doesn't, it's not reasonable to expect someone else to figure out a custom vps for you when they have no access to it and you do.
Back to top
Display posts from previous:   

All times are GMT - 8 Hours