sudo – -bash: echo: write error: invalid argument

I have an Intel upboard motherboard and I want to use its gpio pins. To do this, I try first below the code:

echo 17> sys / class / gpio / export

but when I run this, I take this mistake

-bash: echo: write error: invalid argument

I looked for this error in many pages and tried the suggested solutions but it did not work. What can be the problem and how can I solve it?

node.js – Add a review for NPM sem sudo

You are here for you, it's the best idea possible sudo

MacBook-Air-of-Alan: ~ Collins $ npm i -g react-native-cli
npm WARN checkPermissions Missing write access in /Users/collins/.npm-global/lib/node_modules/react-native-cli
npm WARN checkPermissions Missing write access in /Users/collins/.npm-global/lib/node_modules
npm ERR! path /Users/collins/.npm-global/lib/node_modules/react-native-cli
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: Permission Denied, navigate to & # 39; /Users/collins/.npm-global/lib/node_modules/react-native-cli'
npm ERR!  [Error: EACCES: permission denied, access '/Users/collins/.npm-global/lib/node_modules/react-native-cli'] {
npm ERR! Stack: "Error: EACCES: permission denied, access & # 39; +
npm ERR! "& # 39; /Users/collins/.npm-global/lib/node_modules/react-native-cli'"
npm ERR! errno: -13,
npm ERR! code: "EACCES",
npm ERR! system call: & # 39;
npm ERR! path: & # 39; /Users/collins/.npm-global/lib/node_modules/react-native-cli'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely that you do not have the necessary permissions to access this file as the current user.
npm ERR!
npm ERR! If you think this could be a licensing issue, please double check the
npm ERR! permissions of the file and its directories, or try to execute
npm ERR! the command again as root / administrator (although this is not recommended).

npm ERR! A complete diary of this run can be found in:
npm ERR! /Users/collins/.npm/_logs/2019-06-13T22_24_55_458Z-debug.log

Where should I put sudo security policies?

I'm working on a cli application that, among other things, is supposed to generate a directory with initial content and configure an Apache configuration file to use that directory under a certain subdomain.

I want this application to be run by normal users. Therefore, to be able to interact with Apache configuration files (which belong to root), I need to add a new security policy that will allow the user to execute that particular part of it. 39 as application. root.

However, I want to keep this as modular as possible. I will distribute this application on several computers later, so I do not just want to add the required line in the / etc / sudoers file.

My question is: where would be best to put this separate file and how can I load it?

sudo – Kill process as root: unauthorized operation

I'm trying to kill a process by a user other than me on macOS High Sierra, but I still get an error even with sudo:

$ sudo kill 108
kill: 108: unauthorized operation

The PID exists:

$ ps ux -p 108
_sentinel 108 3,6 1,5 5364180 245992 ?? Rs 23may19 149: 15.88 / Library / Sentinel / sentinel-agent.bundle / Contents / MacOS / sentinel

How can I diagnose why kill sudo is failing? Is it because of the protection of the integrity of the system? If so, how can I disable the relevant attributes on the process so that kill sudo successful?

I am do not tries to disable SIP globally because the process in question belongs to SentinelOne (do not a pre-installed basic MacOS application).

I am stuck during the update and I get errors in the terminal from sudo get-apt update

I keep trying to update with sudo apt-get update, but I encounter errors after it runs and gets the update, then stains and errors
usr / lib … not found
apt runtime problem
the return of pross erroe,
what to do again with all this line of code.

18.04 – sudo freshclam failed – permission problem?

I receive the following error when trying to run manually freshclam on Ubuntu 18.04, as a super user (I've already stopped the demon as described in other questions).

# sudo freshclam
Wed 22 May 07:33:08 2019 -> The ClamAV update process started on Wed 22 May 07:33:08 2019
Wed 22 May 07:33:08 2019 -> ^ Your ClamAV installation is obsolete!
Wed. May 22 07:33:08 2019 -> ^ Local version: 0.100.3 Recommended version: 0.101.2
Wed 22 May 07:33:08 2019 -> DO NOT PANIC! Read
Wed 22 May 07:33:32 2019 -> getfile: impossible to write 8192 bytes in /var/lib/clamav/clamav-61ad7aac1e8b42b507986f04c334427d.tmp/clamav-cba52511a773dacb076f4e4c4b4b1a7a7a
Wed 22 May 07:33:32 2019 -> ^ Unable to download main.cvd file from
Wed 22 May 07:33:33 2019 -> * Unable to query

The manual creation of the file works however, so I am not sure that it is a problem of authorization.

# mkdir /var/lib/clamav/clamav-63297260eb8cf259cb59552e4bddc3b3.tmp/
# dd si = / dev / urandom of = / var / lib / clamav / clamav-63297260eb8cf259cb59552e4bddc3b3.tmp / clamav-7802c73731c6f7f34959ac4d37b24f6e.tmp count = 5840
5840 + 0 records in
5840 + 0 records
2990080 bytes (3.0 MB, 2.9 MB) copied, 0.0424701 s, 70.4 MB / sec

I found both sources below:

But what they suggested did not help either (I do not have quotas and I tried to stop AppArmor, but I still have the same problem.)

Any other idea, what should I check?

Some custom icons are displayed only in sudo mode

Some Zafiro icon theme icons are only displayed when I use Nautilus in root mode (sudo nautilus), but are not displayed in normal mode.

Normal mode:
enter the description of the image here

Root mode:
enter the description of the image here

Thank you.

Permissions – Is it safe to authorize the use of sudo to users created by the application?

I have a jenkins configuration on my server that automatically created the Jenkins user, which is used for its os operations. However, I need Jenkins to stop and start a service (via systemctl) after a specific construction is completed.

My current script (which is executed after a compilation of frontend) looks like this:

sudo systemctl stop myapp
rm -f /opt/myapp/myapp.jar
target mv / myapp.jar / opt / myapp
sudo systemctl start myapp

For this to work, I simply added the Jenkins user in sudoers file for all commands without password prompt:


Is it safe to do that? Which vulnerabilities do I expose? Is there a better way to do this? If yes, how?

mojave – Terminal locked indefinitely on sudo

I am on the latest version of Mojave 10.14.4 (18E226), Darwin 18.5.0 on a Mac Pro 2012. The system has become totally unusable for all sudo commands. He gets stuck indefinitely every time I shoot a sudo. In addition, remote screen sharing has also stopped working. It worked well before the reboot. I even disabled the firewall after rebooting, but the remote screen sharing still does not work. SSH works well.

I came across this bug under Mac OS 10.12.4 on several forums. Most of the solutions involve modifying the sudoers file, but that involves running a sudo command and "wait", but I waited for hours without success!

Not sure if it's connected, but I've recently removed administrator privileges for a user (in System Preferences> Users & Groups). The system requested a reboot for the changes to take effect. I restarted and this bug came into play.


Can no longer run sudo – Ask Ubuntu

I was having fun with my sudo file (bad idea), but I was trying to start the service without using a password. Now, I get an error:

/ etc / sudoers: syntax error near line 34 <<< sudo: sudo analysis error: no valid sudoers source was found, quiting …

How can I fix this? I can connect with another account, but I can not access sudo either …