Mac Reset Password Prompt [closed] - macos

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
So I will do my best to explain what I am looking for assistance with.
So I am looking for a way to create a password reset prompt similar to what is out there for Windows. For example when a password expires on a domain for Windows it will ask for the current password and and a new password.
Here is a screenshot of what I am referring to: http://moritzlaw.osu.edu/technology/training/Windows7/PasswordPrompt.jpg
I am looking for a way to do the samething on a Mac that is NOT on a domain. I am looking to create some type of tool or script to be ran that will make it so the next time a user signs on, they have to change their password.
Thank you in advance for your help.

loginwindow does this automatically when a user's password expires; the only trick is to make a local user's password expire. You can do this with the pwpolicy command:
pwpolicy -a adminuser -u usertoforcechange -setpolicy "newPasswordRequired=1"
There are a bunch of policies you can set, including minimum length, at least one letter, at least one digit, expiration period, etc. See the pwpolicy man page for details.

You can force password expiration on non-activeDirectory non-OpenDirectory accounts by changing the default setting in the com.apple.loginwindow plist. NUMBER should be 0 if you want it expired now, or NUMBER for the number of days you want passwords to be valid for.
sudo defaults write /Library/Preferences/com.apple.loginwindow PasswordExpirationDays NUMBER

Related

How to enter token without leaving history in terminal? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I'm trying to call GitHub API in the terminal. It requires to input the username and token. Token are entered with plain text. For security purposes, I don't feel like leaving some token history on this public computer.
How can I enter the token without leaving history?
If $HISTCONTROL is set to ignorespace or ignoreboth (which is the default):
You can type a space before the command to prevent it from being recorded in the history.
See also: https://unix.stackexchange.com/a/115922/198262
If you need to use this command several times, you can first store the token in a variable and prefix the variable assignment with a space and then just use the variable in your commands without having to remember the space. You could also disable the history for the current session entirely using set +o history.

How to reset the admin password for Ubuntu on Windows [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I have Bash Ubuntu on Windows 10. This is enabled by turning on the Developer mode feature so the normal non-programmer would likely not need this. I need to reset the password. I must have typed it wrong (twice, somehow) when I first set it up. How can I do that?
This has been answered HERE
Copying from their answer:
In Windows command prompt change the default user to root:
lxrun /setdefaultuser root
Now Bash on Ubuntu on Windows logs you in as root without asking password
Use passwd command in Bash to change the user password:
passwd your_username
Change the default user back to your normal user in Windows command prompt
lxrun /setdefaultuser your_username

Windows 10 - Bash (Ubuntu) SU (Root Password) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
Recently updated to Windows 10, installed Ubuntu Bash. Wanted to start configuring, But I have hit a wall already.
When installed, you are asked for a username and password for your account.
This creates a user level.
Is it possible to access to root user, SU?
Every time I try, it asks for a password, and none of the accounts on the PC work (i.e., Windows 10 admin account password does not work). Tried default passwords too etc., all fail.
The reason for it is when looking at the users home directory: When creating a file, it creates it under my Windows User Account (Permissions).
But when I view files created from Bash, they are created for Root user.
So this is the confusion, I modified bashrc and it's no longer owned by root, So it's not accessible.
But I cannot login to root to create or modify the files.
Am I being a complete noob or something?
When bashrc is not owned by Root, when loading Bash.exe, I get .bashrc Input/output error.
as far as i know you'll have to type "sudo su"

How to let other people use ssh to connect to my computer? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
My operating system is Mac OS X.
I want to use bash command to let other people use ssh to connect my computer.
How do I do?
set up a user account for them on your computer;
allow logon privileges for the user.
OS X Server puts a pretty GUI face on doing this.
You need to edit the /etc/ssh/sshd_config file and add the user to the end of the file with the following syntax. Also that user will need to be a valid user on the local machine or found in a bound directory service.
vi /etc/ssh/sshd_config
AllowUsers username1
There are other settings you can set in regards to ciphers and keys that improve security. Also you may need to modify any firewall settings that may be in place.

Oracle Change Username [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I use turkish character in my username "İ", its works fine while logging on oracle enterprise with browser but when I try to connect database with visual studio it makes problem so I think 3 diffrent kind of idea may able to help solve this issue.
-How can I change my oracle username ?
-How can I make vs with working turkish characters too("Ç, Ş, İ)"
-How can I create new user without lost any data in oracle manager( İts like create an alias to referance old user's info. tables roles privileges everything must be same, just user name different )
Thank you who feel try to help
Well,
you cannot change schema name referring to Tom Kyte's answer but you can export the data and then import it to another user
with working turkish characters too ("Ç, Ş, İ)" - I am not sure if there is a good reason to put national characters to the variable/schema names. Isn't it enough to use English? English was never the language of my country (and I've changed already 2) and it was always enough!
according to this answer you can create a script to grant everything to a new user and then according to the answer here you can easily change schema every time e.g. on login

Resources