In Windows when I shut down my computer the network card powers off as well.
In Ubuntu when I power down the network card powers off for a second (at least going by the lan light on my router) but then powers back on.
I know this is to allow wake on lan but I have no need or desire to wake the computer.
How do I do this in Ubuntu?
I am willing and capable of using terminal commands, but if you are going to give them to me please explain what they do as well. Other than safety, which is not really a concern on this sight, the other users will pounce on an unsafe command, it is hard to learn if commands are just thrown out with no explanation.
I would prefer the Lan card to shut off in both power off and sleep but will settle for power off only.
I never noticed that before as I had only account on my Mac but since I created one for my son, when I have a session opened and close the lead and leave the Mac until it shuts down because of low battery, if my son glugs it and starts it, when he arrives on the login screen and selects his user, it connects him to my last used session. I can’t tell why it does that and how to prevent it. We have two different accounts and passwords of course. So it looks like it restores the last session that was runnign before the power loss. Any idea? I have some security concerns on this…
I’m trying to write a script that ssh’s to an ESXi 6.7 and shuts down the host and also shuts down the VMs according to the current system shutdown policy.
I’m running Dell customized image ESXi 6.7 in a Dell R710 with a dual Xeon X5650 and 144GB RAM.
In fact what I want is the same that I can get with:
Shutdown via GUI
Shutdown via console
I have ssh enabled in the server.
I already tryed:
host_shutdown.sh (it just gets there indefinitely).
/bin/host_shutdown.sh (it to gets there indefinitely).
halt (shutdowns the server but it does not shuts down the VMs)
I also tried:
esxcli system shutdown poweroff --reason I_want_IT
but the system must be in maintenance mode and I want to do it without entering maintenance mode
I then discovered this thread here in Server Fault, but it does not work in my server (I suppose it only runs on ESXi 5):
How do I shutdown the Host over ssh on ESXi 5 so it shuts down the guests properly?
I think I’m too dumb to discover on my own how to do it, because I presume it must be a simple thing to do.
I’m curious as to whether, and if so why, Unix and Linux distributions still ship with default accounts shutdown, halt and sync. Specifically (from a Red Hat document),
sync:x:5:0:sync:/sbin:/bin/sync shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown halt:x:7:0:halt:/sbin:/sbin/halt
From a historical perspective, these accounts were set up so that one could log in at the physical console with these accounts’ credentials (traditionally they shipped with a null password, so all you needed was to enter the user name) and properly shut down a system without having to provide the root password.
This could be useful in the case of a desktop workstation, but is questionable in the case of a server system. I don’t recall there ever being any protections against logging in from remote terminals or the Internet with these accounts (unlike root itself) and shutting down the system, which creates an extreme risk of a DoS attack. Therefore, best practices have dictated for years that these accounts be removed on sight, or at the very least, locked like all other default accounts to prevent use. As default accounts go, these are probably the most dangerous.
So I’m wondering if the OS vendors have finally gotten the clue not to ship systems with these rather egregious defaults, or if there is still any purpose for having them around?
I tested UPS shutdown in case of power failure on Windows Server 2016 + APC Smart UPS + NUT.
In some moment NUT has sent shutdown command to Windows. But instead of real shutdown I observed screen with “Getting ready your server” or something like it, I do not remember exactly. Screen like it were some updates installing during shutdown process. But server has been configured for anual upates. And I have checked and installed all updates couple of ours before this.
It took 20-25 minutes for shutdown process to complete. Fortunately UPS did not turn off the power (due to some config errors). But in real situation with correct configs UPS would remove AC power from server in 3 minutes after shutdown command.
Later I’ve investigated logs and have found that CBS (Component Based Servicing) has began some maitenanace tasks several munites before shutdown. So Windows waited for it to complete.
15:36:55 shutdown command with 30 sec delay (shutdown.exe /f /s /t 30) 15:37:25 user logoff about 15:55 shutdown has completed
2019-05-08 15:34:59, Info CBS Maint: begin deep clean ... ... 2019-05-08 15:37:26, Info CBS Trusted Installer signaled for shutdown, going to exit. 2019-05-08 15:37:26, Info CBS A system shutdown was initiated while idle scavenging was running 2019-05-08 15:37:26, Info CBS Shtd: Prepare for shutdown processing. 2019-05-08 15:37:26, Info CBS Plan: Package: Package_for_RollupFix~31bf3856ad364e35~amd64~~14393.2273.1.4, Update: 4103720-19196_neutral_PACKAGE, current: Absent, pending: Default, start: Absent, applicable: Absent, targeted: Absent, limit: Absent, selected: Default 2019-05-08 15:37:26, Info CBS SetProgressMessage: progressMessageStage: 0, ExecuteState: ExecuteStateNone, SubStage: 0 2019-05-08 15:37:26, Info CBS Shtd: PreshutdownTimeout: 3600000ms, BlockTimeIncrement: 900000ms 2019-05-08 15:37:26, Info CBS Shtd: progress thread started
It seems for me a problem that any process can affect shudown. Especially when server must shutdown as soon as possible.
- Is this a behaviour of only WinServer2016? What about WinServer2012R2?
- Is it possible to make forced but correct shutdown to override such busy processes?
I am relatively new to Macs and their osascript syntax. I have a mac mini set up as a server and I am trying to use Apple Remote Desktop to send a command to one of the iMac workstations. When I send the command osascript -e ‘tell application “System Events” to shut down’ I get the message execution error: File permission error (-54). I am unsure how to resolve this. Any help would be greatly appreciated!
I can’t access the terminal or the other resources in system.
Only thing is to press the power button and reach the login window again
Usernames such as HP, root and my name was given in upper and lower case letters
I’m writing a script which I want to run before every shutdown of my ubuntu system. I have placed my script named myscript inside /etc/init.d folder and then created symbolic links in rc0.d and rc6.d as K01myscript and S01myscript in rc5.d. But the problem is that the script is not running at all.
I am working on macOS Mojave unified logs,which are as follows:
2019-04-29 11:16:07.480418+0900 0xc2 Default 0x0 0 0 kernel: (AppleSMC) Previous shutdown cause: 5 2019-04-29 11:16:16.029045+0900 0x708 Default 0x0 0 0 kernel: (IOPlatformPluginFamily) Shutdown cause was a PWROK event (Same as GEN_PMCON_2 bit 0) 2019-04-29 11:16:16.029046+0900 0x708 Default 0x0 0 0 kernel: (IOPlatformPluginFamily) Shutdown cause was a PWROK event (Same as GEN_PMCON_2 bit 0) 2019-04-29 11:16:16.029048+0900 0x708 Default 0x0 0 0 kernel: (IOPlatformPluginFamily) Shutdown cause was a SYS_PWROK event (Same as GEN_PMCON_2 bit 1) 2019-04-29 11:16:16.029049+0900 0x708 Default 0x0 0 0 kernel: (IOPlatformPluginFamily) Shutdown cause was a SYS_PWROK event (Same as GEN_PMCON_2 bit 1) 2019-04-29 11:16:16.029051+0900 0x708 Default 0x0 0 0 kernel: (IOPlatformPluginFamily) Shutdown cause was a THRMTRIP# event (Same as GEN_PMCON_2 bit 3) 2019-04-29 11:16:16.029051+0900 0x708 Default 0x0 0 0 kernel: (IOPlatformPluginFamily) Shutdown cause was a THRMTRIP# event (Same as GEN_PMCON_2 bit 3) 2019-04-29 11:31:33.524822+0900 0xc2 Default 0x0 0 0 kernel: (AppleSMC) Previous shutdown cause: 1 2019-04-29 11:31:42.320623+0900 0x71f Default 0x0 0 0 kernel: (IOPlatformPluginFamily) Shutdown cause was a PWROK event (Same as GEN_PMCON_2 bit 0) 2019-04-29 11:31:42.320623+0900 0x71f Default 0x0 0 0 kernel: (IOPlatformPluginFamily) Shutdown cause was a PWROK event (Same as GEN_PMCON_2 bit 0) 2019-04-29 11:31:42.320625+0900 0x71f Default 0x0 0 0 kernel: (IOPlatformPluginFamily) Shutdown cause was a SYS_PWROK event (Same as GEN_PMCON_2 bit 1) 2019-04-29 11:31:42.320626+0900 0x71f Default 0x0 0 0 kernel: (IOPlatformPluginFamily) Shutdown cause was a SYS_PWROK event (Same as GEN_PMCON_2 bit 1) 2019-04-29 11:31:42.320628+0900 0x71f Default 0x0 0 0 kernel: (IOPlatformPluginFamily) Shutdown cause was a THRMTRIP# event (Same as GEN_PMCON_2 bit 3) 2019-04-29 11:31:42.320629+0900 0x71f Default 0x0 0 0 kernel: (IOPlatformPluginFamily) Shutdown cause was a THRMTRIP# event (Same as GEN_PMCON_2 bit 3)
What do the following mean:
- Previous shutdown cause: 5 (Previous shutdown cause on High Sierra means normal shutdown). Can it be the same in Mojave?
- “Shutdown cause was a PWROK event” (Same as GEN_PMCON_2 bit 0)
- “Shutdown cause was a THRMTRIP# event”
Comments/observations are welcome
I am on 10.14.4, the same thing was happening at least on 10.14.1.
Laptop: MacBook Pro (Retina, 15-inch, Mid 2014)
So the problem is if I open “Apple Menu” in top left corner and click any of the following options:
- Shut Down…
- Log out My Name
sudo reboot works fine, holding the power button works fine, but that’s not a graceful shutdown and I would like to avoid it, it also prevents updates from being applied if shut down this way.
Also when I go to Preferences > Software Updates > click Update Now then a dialog pops up with an option “Restart Now”. Clicking it does nothing similar to Apple Menu.
What I tried:
- I checked the Console application for logs (nothing relevant in there)
- I checked /var/log/system.log, I checked /var/log/shutdown_monitor.log (nothing relevant in there)
- SMC reset
- NVRAM reset
- Created new fresh user, to see if it’s a problem with my user account (the issue persists)
- I disabled all the login items and bunch of startup services (java updates, and bunch of similar non-system stuff)