- Admin password not working for sudo?
- UDPATE #1
- UDPATE #2
- UDPATE #3
- 2 Answers 2
- Idea #1 — Using your password
- Idea #2 — Lacking sudo permissions
- Idea #3 — Group membership
- Idea #4 — TextExpander
- Idea #5 — Corrupt account or password
- Idea #6 — Create another account
- Idea #7 — An issue with certain commands
- If you get a personalization error when reinstalling macOS on your Mac with Apple M1 chip
- Use Apple Configurator
- Or erase your Mac and reinstall
- Erase using Recovery Assistant
- Then use one of these methods to reinstall macOS
- Use the Reinstall macOS Big Sur utility
- Or use a bootable installer
- Or use Terminal to reinstall
- Why can’t I run `su`? (and how should I do?)
- 7 Answers 7
- Modern solution: sudo -u
- Old-school: sudo su someuser
- root user
- 1Password 7 — Password Manager 4+
- Generate & keep passwords safe
- AgileBits Inc.
- Screenshots
- Description
- What’s New
Admin password not working for sudo?
I’ve been trying to run this command in the terminal:
However after being prompted to type in my password (which I believe it needs to be the admin’s password) and after typing it, it just says: «Sorry, try again».
I am logged onto the only user account this Mac has, which has admin privileges. I’ve tried repairing disk permissions as well as reinstalling the OS (Mojave), but with no success.
Not sure what to do anymore! Can someone help me out with this one?
UDPATE #1
When I run $ sudo -l I get this:
And if I try and run visudo or sudo -u diogopires visudo , I get:
UDPATE #2
Furthermore, to check group membership, I got:
UDPATE #3
Upon running set -x , I ran and got:
And afterwards, I ran and got:
2 Answers 2
For whatever reason you seem to have the targetpw option set. From man sudoers :
So you can do things like sudo -u diogopires ls by entering your own password, but you can’t run sudo -u diogopires visudo because this would run visudo as diogopires (and not as root as it should).
- Boot into single user mode by pressing Cmd-S on startup
- Run mount -uw /
- Use visudo (without sudo ) to remove the option
- Type Ctrl-D or run reboot to reboot
Idea #1 — Using your password
The entire purpose of sudo is to grant users or groups of users access to elevated functions without having to reveal the Administrator’s credentials. Therefore the password you’ll want to use when prompted by the sudo command is in fact your user’s password.
Additionally you can use the switch -l to sudo to see what specific permissions your user ID has been granted.
The above is stating that the user joeuser has all permissions, (ALL) ALL , on the system.
Idea #2 — Lacking sudo permissions
If you’re finding that your password is correct, then it’s likely that your account simply doesn’t have an entry in Sudo’s configuration files giving the user any permissions to use. To confirm this you can try running the command visudo to view Sudo’s configuration file:
NOTE: visudo is merely opening the file /etc/sudoers in vi in a protected manner so that no 2 users can stomp on it at the same time.
Idea #3 — Group membership
Typically with user’s being granted access to sudo they’ll be added to a special UNIX group called admin . You can confirm if your account is a member of this group like so:
This group is special since it’s typically what shows up in the system’s /etc/sudoers file granting users admin access via sudo via this line:
Idea #4 — TextExpander
I was able to find threads where other people were reporting that TextExpander was auto capitalizing the first word in a sentence, which was causing the first letter of their password to be capitalized when they would type it. You can disable TextExpander to see if this is the cause of your password issues with sudo .
Idea #5 — Corrupt account or password
There’s a slight chance that your user’s password may have become corrupt in some capacity which is rendering sudo unable to use it. To help eliminate this as a possible cause you can try resetting/changing your user’s password. To do so access the Systems Preferences and then open up Users & Groups and select your user and click the Change Password button.
Additionally you may find some success with attempting to follow some of the steps in this guide titled: How-To Fix Corrupt User Accounts in macOS if you suspect your macOS user account has become corrupt.
NOTE: I’d save this last suggestion as something to try once you’ve completely eliminated everything else.
Idea #6 — Create another account
To eliminate any issues with the system itself, you may want to try creating another macOS user account and grant this user sudo access as well. Once you’ve created this account, attempt to use sudo -l and verify that it functions. If it does not, then your issue is likely with the system either being mis-configured or perhaps some files/libraries that are critical to sudo have become corrupt.
Idea #7 — An issue with certain commands
I noticed someone asking you in comments about how you were able to run the command sudo -l and provide your password, but in subsequent commands such as sudo ls it failed.
This got me to thinking that perhaps your issue has something to do with an alias, shell function, or shell script that’s getting picked up when you run sudo ls .
To investigate this idea a bit more you can do the following:
This will enable more verbose output from commands. The set -x is what enables this. The set +x at the end will disable this.
In between we’ll run the sudo -l and the sudo ls commands so we can see what commands are actually getting run when these execute.
Your output should look the same, if you see something other than sudo ls then you may have an alias or shell function that’s inhibiting your ability to run sudo ls .
Источник
If you get a personalization error when reinstalling macOS on your Mac with Apple M1 chip
While reinstalling, you may get a message that an error occurred while preparing the update.
If you erased your Mac with Apple M1 chip, you might be unable to reinstall macOS from macOS Recovery. A message might say «An error occurred while preparing the update. Failed to personalize the software update. Please try again.» Use either of these solutions to reinstall macOS.
Use Apple Configurator
If you have the following items, you can resolve the issue by reviving or restoring the firmware of your Mac:
- Another Mac with macOS Catalina 10.15.6 or later and the latest Apple Configurator app, available free of charge from the App Store.
- A USB-C to USB-C cable or USB-A to USB-C cable to connect the computers. The cable must support both power and data. Thunderbolt 3 cables aren’t supported.
If you don’t have these items, follow the steps in the next section instead.
Or erase your Mac and reinstall
Use Recovery Assistant to erase your Mac, then reinstall macOS. Before you begin, make sure that you have enough time to complete all steps.
Erase using Recovery Assistant
- Turn on your Mac and continue to press and hold the power button until you see the startup options window. Select Options, then click Continue.
- When you’re asked to select a user you know the password for, select the user, click Next, then enter their administrator password.
- When you see the utilities window, choose Utilities > Terminal from the menu bar.
- Type resetpassword in Terminal, then press Return.
- Click the Reset Password window to bring it to the front, then choose Recovery Assistant > Erase Mac from the menu bar.
- Click Erase Mac in the window that opens, then click Erase Mac again to confirm. When done, your Mac restarts automatically.
- Choose your language when prompted during startup.
- If you see an alert that the version of macOS on the selected disk needs to be reinstalled, click macOS Utilities.
- Your Mac will begin activating, which requires an internet connection. When your Mac is activated, click Exit to Recovery Utilities.
- Perform steps 3 through 9 once more, then continue to the next section, below.
Then use one of these methods to reinstall macOS
After erasing your Mac as described above, use one of these three methods to reinstall macOS.
Use the Reinstall macOS Big Sur utility
If your Mac was using macOS Big Sur 11.0.1 or later before you erased it, select Reinstall macOS Big Sur in the utilities window, then follow the onscreen instructions. If you’re not sure, use one of the other methods instead.
Or use a bootable installer
If you have another Mac and a suitable external flash drive or other storage device that you don’t mind erasing, you can create and use a bootable installer for macOS Big Sur.
Or use Terminal to reinstall
- Select Safari in the utilities window in macOS Recovery, then click Continue.
- Open the article you’re reading now by entering this web address in the Safari search field:
https://support.apple.com/kb/HT211983 - Select this block of text and copy it to the clipboard:
- Bring Recovery to the front by clicking outside of the Safari window.
- Choose Utilities > Terminal from the menu bar.
- Paste the block of text you copied in the previous step, then press Return.
- Your Mac now begins downloading macOS Big Sur. When done, type this command and press Return:
./Contents/MacOS/InstallAssistant_springboard - The macOS Big Sur installer opens. Follow the onscreen instructions to reinstall macOS.
If you need help or these instructions aren’t successful, please contact Apple Support.
Источник
Why can’t I run `su`? (and how should I do?)
Whenever I try to issue su I get this:
Needless to say, I’m entering the correct admin password which does work with sudo . What I want is not having to enter sudo each time.
7 Answers 7
In MacOS X, the root user is disabled by default, therefore su will not work. As others have stated, it’s best to use sudo .
If you must enable the root user, see Apple’s technote: Enabling and using the «root» user in Mac OS X.
You have two options. The first is to use sudo -s — this will give you superuser access, but you will still remain ‘yourself’ (so to speak), so things like
will still be your home directory. Alternatively, you can use sudo su , which gives you a shell as the actual root user of your Mac.
Modern solution: sudo -u
To run as another use, use sudo -u .
For example, to run a text-editor such as nano:
…and enter your Mac admin user password when prompted. At this juncture, it is your Mac admin user who is invoking sudo , not the someuser user so you do not enter the someuser password.
- sudo means to run something using superuser privileges.
- -u means “run a specified command as this specified user”.
- someuser should be replaced with your desired user name.
To simulate an initial login as a particular user, including running their startup scripts, use -I .
This runs the nano app as the user someuser but only after having run the startup scripts for that user.
If we opt to not specify a command or app to run, we get an interactive shell running as that user.
Old-school: sudo su someuser
Another approach uses the su command in combination with the sudo . The su command means “switch user”.
Or, to include running the user’s startup scripts, add the hyphen.
root user
The root user in Unix-related operating systems have absolute power to do anything.
Apple has chosen to disable the root account in macOS, to avoid security vulnerability exploits and to protect you from shooting yourself in the foot. Apple created the idea of the Administrator user accounts who have many powers, more powers than a Standard user account, but not absolute power like root has. See this Apple Support note for discussion.
If need be, you can enable the root user in macOS and then switch to that user. This is strongly discouraged. I would go down this path only as a desperate last resort.
For discussion of this within the context of the postgres user running the Postgres database system on macOS, see this Question on the sister site, DBA Stack Exchange.
Источник
1Password 7 — Password Manager 4+
Generate & keep passwords safe
AgileBits Inc.
-
- 3.2 • 2.4K Ratings
-
- Free
- Offers In-App Purchases
Screenshots
Description
Welcome to 1Password 7.0, the greatest password manager ever created. 1Password remembers all your passwords for you, and keeps them safe and secure behind the one password that only you know. Sign up for a 1Password membership and try it free for 30 days.
== Put Passwords In Their Place ==
◆ Create strong, unique passwords for all your online accounts
◆ Fill usernames, passwords, credit card numbers, and addresses into websites right from your browser
◆ Access your information on all your mobile devices and computers
◆ Share passwords securely with your family or team
◆ Unlock with a touch using Touch ID
== Stay Safer With Watchtower ==
◆ Be notified when your information has been exposed on a compromised website
◆ haveibeenpwned.com integration identifies passwords known to have been leaked on the internet
◆ Discover websites where you’ve reused the same password so you can make them strong and unique
◆ Find accounts that support two-factor authentication to enable another layer of security
1Password is for more than just passwords: it’s the ideal place for financial information, personal documentation, or anything you need to keep secure and accessible.
◆ Store information in more than a dozen categories: logins, credit cards, addresses, notes, bank accounts, driver licenses, passports, and more
◆ Organize your information with tags and favorites
◆ Quickly look up passwords in your menu bar using 1Password mini
◆ Use advanced search to find and filter your information
◆ Create multiple vaults to keep different areas of your life separate
◆ Upload secure documents and view them from anywhere
◆ Add custom fields to your items to store security questions, extra URLs, and any other information you can think of
== Built For Families And Teams ==
1Password has full support for family and team accounts. It’s never been so easy to share the simple security of 1Password with your family or teammates.
◆ Add all your accounts — family, team, business, and individual — to see all your information in one place
◆ Easily move information between accounts
◆ Share secrets securely with your family or team
Get a 30-day free trial when you install 1Password. Your subscription lets you use 1Password everywhere. Your data is kept up-to-date securely and automatically across your devices, and can also be accessed on the web. Learn more at https://1password.com.
== Loved And Used By Millions ==
1Password has been highlighted in The New York Times, The Today Show, GQ, The Wall Street Journal, Forbes, The Verge, Ars Technica, Mashable, and The Guardian.
◆ Recommended in Apple’s «Apps for Getting Things Done» Guide
◆ Named One of The World’s Greatest 100 Apps by Business Insider
◆ Inducted into Macworld’s App Hall of Fame
== We Want To Hear From You ==
We love 1Password and strive to make it the best it can be. Connect with us at @1Password on Twitter and Facebook.com/1Password!
1Password never prompts you for a review because we value your workflow too much to interrupt it. If you feel generous and have a couple of minutes, please leave a review. It makes a huge difference to us. Thank you in advance. 🙂
== The Nitty Gritty Fine Print ==
* 1Password can be used in read-only mode without an active 1Password membership. Full access can be enabled with an in-app purchase.
* 1Password is a monthly service that costs $3.99 for individuals or $6.99 for a family of 5 (prices vary by region). Payment will be charged to iTunes Account at confirmation of purchase and auto-renews at the same price unless disabled in iTunes Account Settings at least 24 hours before the end of the current period. Your subscription can be managed in your iTunes Account Settings. No cancellation of the current subscription is allowed during the active subscription period.
* Privacy policy: https://1password.com/legal/privacy/
* Terms of Use: https://1password.com/legal/terms-of-service/
What’s New
# 1Password 7.8.8 for Mac has been released!
1Password has long supported secure storage of files and photos in your vaults alongside your other items. Today we are giving you the ability to store files and photos _inside_ your other items with our newest feature: File Attachments!
Snap a photo of your license and add it to your Driver License item. Include a picture of your vaccination card with a Medical Record item. Do the same for credit cards, passports, and more!
While we never prompt you for a review within 1Password itself, seeing your 1Password review on GetApp would be really cool.
If you need us you can find us at @1Password on Twitter. If you have questions or need support just pop on over to support.1password.com and we’ll point you in the right direction.
### NEW
* Adds support for file attachments to all item types in your 1Password.com account.
* Can now export the first one-time password when exporting to CSV.
### IMPROVED
* Improved the Security preferences to indicate that Apple Watch unlock isn’t possible if you don’t have a Secure Enclave. <#5145>
* Improved the types of concealed fields being included in Watchtower -> Reused Passwords so that it no longer includes bank pins and social security numbers.
* Improved the lock screen’s biometry interface refresh when waking from sleep/returning from fast user switching so that it is more likely to get back correct state information.
Источник