Questions tagged [sudo]

Used when executing commands as another user.

Filter by
Sorted by
Tagged with
0
votes
0answers
33 views

How to execute admin level command via remote login without typing password?

I would like to allow a remote script to access my Mac (Catalina 10.15.2) at the root level. I know that I can enable keyboard-less access at the user level, by using publickey authentication, via ...
4
votes
3answers
252 views

How do I prep a, temporary, root login before editing sudoers?

I want to alter my sudo capabilities on my mac, to avoid password prompts on starting postgres among other things. I'm reading Michael Lucas' Sudo Mastery and generally have an OK idea on how to ...
2
votes
2answers
36 views

Cannot delete a .sparsebundle on / with permissions drwxr-xr-x@ 6 root wheel

Even running commands as sudo I cannot change the permissions or delete the folder. sh-3.2# xattr -l filename.sparsebundle/ com.apple.FinderInfo: 00000000 00 00 00 00 00 00 00 00 20 00 00 00 00 00 ...
0
votes
1answer
312 views

Cannot sudo anymore - macOS Catalina

I have a problem. I have 2 users user (normal user) and admin (admin user). I normally work on user user and when I wanted to update some files (as for example /etc/hosts) I did: $ su admin Password:...
1
vote
3answers
51 views

Deleted symlink to /etc and now missing sudoers

I messed up bad, real bad. I accidentally deleted the symbolic link to my /etc directory. Now I can't create another one because I keep getting an error: $ sudo ln -s /private/etc /etc sudo: unable ...
4
votes
1answer
171 views

Catalina: /usr/sbin/accept command not found

I have an applescript with code below that had been working until Catalina 10.15 update, gives command not found error: do shell script "sudo /usr/sbin/accept '2nd-flr-Library-rm228'" with ...
3
votes
1answer
135 views

Is it possible to use an Apple Watch to authorise sudo in Catalina?

MacOS Catalina let us do some higher privilege actions on our Mac by authorising through a press on our Apple Watch button. Would it be possible to use that feature to authorise a sudo command in the ...
2
votes
0answers
886 views

Can't open an app as root. Sudo command not found

I'm trying to install the torrent downloader Vuze and every time I try to open the Vuze Installer via the terminal, in my case, sudo /Users/naza/Downloads/VuzeInstaller.app after put the password ...
0
votes
0answers
16 views

Can't fix sudoers permission on osx mojave [duplicate]

A friend had borrowed my macbook air running osx mojave and somehow managed to change the ownership of the /etc/sudoers file to userid 501 (rather than 0 which it should be). Because of this, I can't ...
1
vote
1answer
23 views

Catalina: HTTP downloads in Terminal stall without sudo

I am experiencing a weird behavior only affecting running apps in the Terminal (BASH). When running wget someurl, it will timeout. If I run the same with sudo, it works. Other apps have no ...
0
votes
0answers
74 views

How to add Sudo Insults with TouchID without disabling SIP

I am following a guide to recompile sudo with insults. However, I felt uncomfortable disabling SIP so I modified it a bit to allow me to use it with SIP enabled. Unfortunately recompiling sudo broke ...
2
votes
1answer
60 views

How to run privileged programs without elevation by sudo?

I got the mtr ping-traceroute combo util through Homebrew and I'd like to run on new Terminal windows without having to become superuser (or elevation, sudoing, whatever it's called on UNIX) each time ...
3
votes
1answer
62 views

a bug in “pbcopy” using “system()” call

am losing my hair over this. when using the"pbcopy" in c++ using the system call it doesn't work with foreign languages unless its run in admin using sudo ??? system("echo привиет как дела") - works ...
0
votes
0answers
23 views

How can I create an alias/shorcut to sudo/root an app permanently?

I would like to have an alias to run an app as root always. I am trying to save time and not go through the terminal commands. Thanks!
3
votes
1answer
1k views

Kill process as root: Operation not permitted

I'm trying to kill a process by a user other than myself on macOS High Sierra, but still getting an error even with sudo: $ sudo kill 108 kill: 108: Operation not permitted The PID does exist: $ ps ...
3
votes
3answers
507 views

Remove sudoers using script

At the moment I'm working on a solution to prevent all admins users (except one particular) from running sudo. I can add a specific user to sudoers by running: sudo -i echo '$username ALL=(ALL:ALL) ...
1
vote
0answers
34 views

“sudoers is owned by uid 501, should be uid 0” message, but sudo works fine [duplicate]

Running Mojave on a MBP 2012 13" and I get that message every time I use the sudo command. It isn't preventing me to use sudo, but I get the feeling it'll bite me in the butt at some point in time, ...
1
vote
1answer
82 views

Screwed up administrative name on sudo when trying to change usernames

Disclaimer: I am NOT at all fluent in coding or its jargon, so bear with me. I recently downloaded a software and wanted to remove it. I tried to do it via sudo on the MacBook terminal. I was trying ...
3
votes
3answers
153 views

How can I lock files with specific passwords on mac, ideally through terminal?

I want to lock my /etc/hosts file so that you need a password in order to write. I know you can encrypt files with Disk Utility, but in this case the file needs to be read by the computer and the path/...
1
vote
1answer
23 views

How can I determine after how many minutes of inactivity, Mac automatically logs off without admin privileges?

I cannot access the Advanced page under System Preferences → Security & Privacy to check or change the automatic logout settings. I don't think I can change this setting, and I tried using sudo in ...
0
votes
0answers
93 views

Terminal stuck on sudo indefinitely

I'm on the latest version of Mojave 10.14.4 (18E226), Darwin 18.5.0 on a 2012 Mac Pro. The system has become totally unusable for any sudo commands. It gets stuck indefinitely whenever I fire a sudo. ...
2
votes
2answers
1k views

Admin password not working for sudo?

I've been trying to run this command in the terminal: $ sudo rm -ri ~/.Trash However after being prompted to type in my password (which I believe it needs to be the admin's password) and after ...
1
vote
1answer
2k views

Error: “sudo: command not found” when trying to use XAMPP [closed]

I am trying to use XAMPP to create a server on my MacBook. I'm following the tutorial here: https://www.webucator.com/how-to/how-install-start-test-xampp-on-mac-osx.cfm and I'm stuck on the bit ...
0
votes
1answer
30 views

How can I be in the sudo file on MacBook Air

Every time I write sudo spctl --master-disable on terminal it asked for my password and I type it gives me this error: Wild.ziv is not in the sudoers file. This incident will be reported. "Wild.ziv"...
0
votes
1answer
1k views

Where are folders created by “sudo mkdir” stored?

I am new to mac terminal and I have made some folder using command "sudo mkdir". Some of this folders are hidden :/, in other words I have put a period before their names when using command mkdir. Now,...
5
votes
1answer
5k views

How do I uninstall Trend Micro Security Agent?

I have been trying to uninstall the Trend Micro anti-virus software on my Mac (10.13.6) and have been encountering a lot of difficulty. Trend Micro's website refers to a couple of uninstaller options, ...
2
votes
0answers
390 views

Reduce or disable DNS cache in 10.13 and 10.14

I'm trying to get a hold of the property list, I'm guessing, that specifies the TTL or the amount of records held of the DNS cache of the system, if is not user/root accessible, then command that ...
1
vote
0answers
78 views

“sudo chmod 0 /” deployed as script to remote MACs via Landesk

This probably will not make a lot of sense. We have users that have left the company and have not returned their macs. We are using Landesk as main managing platform, however the MAC managing part is ...
1
vote
1answer
80 views

Return User To Admin Users and Undo Parental Controls

For a while, I had only one user, say, User1, on my Mac's High Sierra. Then there arose a need to have some parental controls. To do that I created a new user, say, User2 and made it an admin while ...
2
votes
1answer
36 views

Why doesn't “su - user -c defaults read” work?

I'm writing a script to set a defaults preference for all users on a machine. When I run it from a root shell, the defaults command runs as if it's been given incorrect arguments. bash-3.2# su - ...
1
vote
1answer
694 views

Running mc (midnight commander) under su on Mojave

After installing prebuild mc binary to Mojave (link and link 2), and trying to run mc under root with sudo command, I got error: $sudo mc common.c unimplemented subshell type 1 read (subshell_pty...):...
0
votes
1answer
42 views

Geektools Shell Problem

In order to monitor the filesystem activity on my computer, I found command "sudo fs_usage", which works very well in Terminal. Then I had the idea to display those system activities (written) on my ...
4
votes
2answers
302 views

unable to open /var/db/sudo/ts/<username>: Permission denied

I'm having a really tough time trying to figure out what's going on with my High Sierra MBP. I've recently come across permissions issues, such as: $ sudo ls sudo: unable to open /var/db/sudo/ts/&...
2
votes
1answer
43 views

Is there a security concern when adding a user to sudoers?

I want to add an user who is not in admin or wheel group into the sudoers file, but I don't want to risk some kind of privilege escalation. Are there any additional privileges for users listed in ...
2
votes
3answers
1k views

How do I prevented the hackers (secret intel) manipulating my terminal again [closed]

How do I prevented the hackers manipulating my terminal again so that my terminal works correct again? Here in the Netherlands we perform cybertest at the company where we work and the attacks are ...
1
vote
2answers
3k views

Sudo command no longer functions properly

When I use the sudo command I get an error message. sudo: /etc/sudoers is world writable sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin If I try to use chmod ...
0
votes
0answers
59 views

Should I add sudo before the fastboot command on macOS just like on Linux?

I will be using fastboot on macOS. I will be following this tutorial. The guide only mentions Windows and Linux, and I do not wish to install those on my Mac right now, and as I think fastboot is the ...
2
votes
1answer
71 views

Is it possible to create a user with all admin rights *except* the ability to interrupt a particular process and access a particular folder?

On Windows, it's not really doable. It is possible on linux with mandatory access control (for example). So you can have a web filter running, but the sudoer wouldn't be able to interfere with it (at ...
1
vote
1answer
129 views

Switching from a non-admin user to an admin user to run an app

I've recently been faced with a challenge at the library I work at that I need to make a small bit of code in MacOS High Sierra that I can't figure out for the life of me! I have some experience ...
2
votes
1answer
2k views

Using terminal, how can I install a DMG file without sudo rights?

All of the answers to this question Is there a command to install a dmg work for me in installing a DMG file from the command line. But I don't want to have users need to enter the sudo password, it ...
2
votes
2answers
238 views

Where should I install new (source code) software on a Mac?

I am new to the Mac philosophy, but I have been using Ubuntu since a while. Now I am using Mac at work, and I have to install a few programs, not apps, from source code distribution. I did try to ...
4
votes
1answer
6k views

How do I install a .dmg file without being a sudo user?

I am on macOS Sierra version 12.10.16. I downloaded an application. This app has .dmg extension. I would like to install it without using sudo or without being one of the sudo users. When I do ...
6
votes
2answers
7k views

Fixing /etc/sudoers file

I'm a systems admin for a company and was thrown into a horribly configured server. In the midst of my refactoring I was adding users to my /etc/sudoers file. I seem to have accidentally removed my ...
2
votes
1answer
125 views

Sudo folder empty/broke

For some reason my I can't run sudo, every time I try, I just get the error sudo: unable to open /var/db/sudo/ts/user: Invalid argument The folder listed in the error (/private/var/db/sudo) is ...
0
votes
1answer
2k views

Terminal sudo dd error while making a bootable drive

So I have been trying to make a bootable Kali Linux USB drive for a while. I am using the command: sudo dd if=/Users/vanshyadav/Desktop/kali-linux-2018.1-amd64.iso of=/dev/disk2 bs=1m It asks for ...
1
vote
0answers
125 views

Sudo intermittently fails

As part of my work I have to run various commands using sudo (I am a local admin on the machine). Recently I have experienced a very strange situation where despite having previously run sudo ...
3
votes
1answer
7k views

User login password not working for sudo

My user login password not working for executing sudo in terminal and I cannot unlock Users & Groups preferences. I tried to write password in editor and paste it but no success on macOS 10.13.3 ...
1
vote
0answers
657 views

How do I repair a “bogus map” error in GPT?

I have a MacBook Pro Retina with OS X Yosemite ver. 10.10.5 with one physical drive 256GB. This drive had 3 partitions: 1 - Mac, 2 - Mac Recovery, 3 - Win 7 64 bit. Due to low disk space on the Win 7 ...
0
votes
1answer
415 views

How can I make sudo in 2 tabs ask for the password only once?

I have a script to automate starting a few servers on the terminal. These are server processes of the software I am developing. They can be recompiled and changed multiple times a day. The binaries ...
2
votes
0answers
33 views

How to get output from the console.app from a non-admin account?

I almost exclusively use a non-admin account for everyday use. Only for installing software, etc. I log in with the admin account. This normally works very well, however, there is one issue I haven't ...