Nmap asks admin privileges each time I restart my machine(which is logged into work domain). How do I avoid nmap asking admin privileges each time I run a script? Is there any way to do that?
Nmap only asks for privileges in order to start the Npcap packet capture driver if it is not started already. Upgrade to the latest version of Npcap to avoid bugs, and during installation make sure that you leave the "Automatically start the Npcap driver at boot time" box checked.
Future releases of Npcap will always start at boot because of problems like this with on-demand start.
Related
I have written an application using docker-toolbox and inno setup script for the application installation in windows 10.
And I want to remove the docker-toolbox VM, while I uninstall my program. However, the VM cannot remove completely by following inno setup script.
[Setup]
PrivilegesRequired=none
[UninstallRun]
Filename: "{cmd}"; Parameters: "/C ""docker-machine rm -y myDocker"""
The command "docker-machine rm -y myDocker" always work whenever runs in my user cmd, but not works in inno setup uninstallrun.
And I checked and found out that docker-toolbox is based on VirtualBox. VirtualBox uses a per-user environment. Becoming root (or any other user) does not give you access or more powers to the original user's VMs. ALWAYS perform VM operations as the user that actually created the VMs. Hence, I have to run a command as a original user in uninstallrun, but I cannot find a way to do so.
Looking forward for a help and support, I have spent lots of times in this problem.
Is there any way to use runasoriginaluser in uninstallrun in inno setup?
You should not modify a specific user profile from an (un)installer that runs with Administrator privileges (installs software for all users).
See Installing application for currently logged in user from Inno Setup installer running as Administrator.
runasoriginaluser flag is not supported in UninstallRun section. Probably because it won't be of any use there anyway. What the flag does in Run section is that it executes program with privileges with which the installer was originally executed. But uninstaller (for installer elevated to Administrator privileges) is executed with Administrator privileges straight away, when executed from Control Panel/Settings app.
Digital Ocean rebooted all droplets 3 days ago but when they came back, my website was down.
Problem seems to arise because all related services (httpd, mysqld, iptables etc) are inactive and have to activate them again.
First of all did anybody else had the same issue and
secondly how can i run systemctl start/stop/restart <service> through droplet's console (sshd not running so droplet's console it's the only way to get into my system)?
Seems that whenever i perform this action console kicks me off, as it is in emergency mode.
I don't know if it's useful info but system is fedora 21.
Use
sudo systemctl enable service.service
to have a service start automatically when your droplet boots.
I am trying to write a code that will listen to messages, and will force ntp sync (using ntpdate command) each time it gets a message.
The code is written in c++, on Ubuntu 14.04, and runs OK. But the system command fails each time, because it does not have root privileges.
This code suppose to start automatically when the system boots up, so I can't just run the executable with "sudo".
After searching the internet, the only solution I found was to log in as root user, but this will compromise security.
I know the ntp daemon process runs with root privileges, but I am not sure how it is implemented.
Do you know of any way I can run c++ code with root privileges without compromising security?
The NTP daemon runs with root privileges because it is started under the root account.
Generally, programs which run as daemons are started under the root account; some of them drop root privileges voluntarily by calling setuid(), seteuid(), etc.
You can always make a dedicated account for the program and run it under that account,
either by making it setuid to that account,
or by using sudo-u,
or, if you start your daemon from a systemd unit file, by specifying user= and group= in the unit description file.
You can then edit the /etc/sudoers to allow that account to run ntpdate and only ntpdate as root without a password.
I'm trying to automate VMWare Desktop on Windows 7 to suspend all vm's before I do a backup job each night. I used to have a script that did this but I've noticed now that it won't suspend anymore with the same command that used to work.
If I do vmrun list I get a list of the running vms with no issue.
If I do vmrun suspend "V:\Virtual Machines\RICHARD-DEV\RICHARD-DEV.vmx" it just hangs and I have to kill the command with CTRL+C.
I've even tried a newer command using -T to specify it's workstation, ie vmrun -T ws suspend "V:\Virtual Machines\RICHARD-DEV\RICHARD-DEV.vmx" and still no love.
If I have the vm already stopped, I can issue vmrun start "V:\Virtual Machines\RICHARD-DEV\RICHARD-DEV.vmx" and it starts fine.
As well as the suspend command, the stop command also does not work. I'm running VMWare Workstation 11.1.3 build-3206955 on Windows 7.
Any ideas?
Update:
I installed latest VMWare Tools on the guest, as well as the latest Vix on the Host so everything should be up to date.
I can start a vm using vmrun with no problem using vmrun -T ws start <path to vmx> but the command doesn't come back to the command prompt, so I'm assuming it's not getting confirmation from the vm that it is now running.
If I cancel the 'start' command and now try and suspend I'm getting the same lack of communication from the guest. If I manually suspend the vm, once it's suspended I get an 'Error: vm is not running' and the 'suspend' command finally times out and comes back.
So, it looks to me like there is no communication from vmrun to the guest about what state it's in etc. Is there a way to debug the communication from the host to the guest using vmrun or other means? Are there ports I need open in the guest OS?
So, I never did get vmrun to work properly on my main system, although I did get it behave ok on my laptop so there is something weird happening on this machine. I also installed a trial of the latest VMWare 12 and the same thing happens.
As a workaround, I ended up changing the power management settings in my guest OS so that it would 'sleep' after 1 hr of inactivity. When this happens VMWare detects it and automatically suspends the guest which is really what I'm looking for. Not the most slick solution but it does manage to unlock the files I need to be backed up in a nightly backup.
Ok, here's a very short and to the point question. When trying to import a virtual PC 2004 Windows 2003 Server VM in VM Workstation 6.0.2 I'm getting an error 'unable to determine guest operating system'. Soo how to fix?
From here:
Make sure that that the VM is not currently running in VMware Server.
Make sure that VMware Server does not have a lock on the VM’s files. You have have to stop all VMware Server Services and/or reboot the (VMWare) server.
Make sure you have appropriate permissions to the VM’s files.
This is a fairly generic error from VMware Converter so I would try the following:
Step 1. Make sure you are running the latest version of VMware Converter. Updates seem to come pretty often for this tool.
Step 2. Check the VMware Converter log file. More often than not you will find the source of your problem here.