Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Linux System Getting Started Tutorial: How to Force Change your password at next logon Linux     - The difference between vi and nano (Linux)

- Python 3.5 will support Async / Await Asynchronous Programming (Programming)

- VNC configuration detailed analysis under Linux (Linux)

- GNU / Linux system, how to clean up memory space (Linux)

- Build your own CA services: OpenSSL command line CA Quick Guide (Server)

- ACL permissions Linux command (Linux)

- Ubuntu download install and configure Plank Dock (Linux)

- wget command examples (Linux)

- OpenGL Superb Learning Notes - Vertex Shader example (Programming)

- Ubuntu Froxlor Server Administration panel installation (Server)

- Ubuntu 12.04 64-bit installation Redmine + Git + ReviewBoard (Linux)

- Linux user login and IP restrictions (Linux)

- Linux Powerful IDE - Geany configuration instructions (Linux)

- In-depth understanding of PHP ini configuration (Server)

- Setting Hibernate connection MySQL database connection pool coding (Database)

- learning Linux ls command examples (Linux)

- Linux operation and maintenance engineers face questions Intermediate (Linux)

- Android Studio interface-related settings (Linux)

- How to upgrade to Oracle 11g Oracle 12c (Database)

- Is Linux the most secure operating system (Linux)

 
         
  Linux System Getting Started Tutorial: How to Force Change your password at next logon Linux
     
  Add Date : 2017-01-08      
         
         
         
  Question: I run a Linux server shared by many people. I just use the default password to create a new user, but I would like the user to change the password the first time you log on. Is there any way to make him / her password at next logon modify it?

In a multi-user Linux environment, the standard practice is to use a default random password to create a user account. After a successful login, new user change the default password. For security reasons, often recommended "force" a user to change the password the first time you log in to ensure that the single-use password will not be used again.

Here is how to force the user to modify his / her password at the next login.

Each Linux user associated with this different passwords and related configuration information. For example, a record of the date of the last password change, the number of days the minimum / maximum change the password, the password expires when the like.

Called chage command-line tool to access and adjust the password expiration configuration. You can use this tool to force the user to change the password at the next logon,

To view a specific user expiration information (for example: alice), run the following command. Note that except yourself view any other user's password information needs root privileges.

$ Sudo chage -l alice

Force users to change password

If you want to force the user to modify his / her password, use the following command.

$ Sudo chage -d0 < user-name >
Originally "-d" parameter is used to set the password "age" (that is, the number of days played last modified password 1970/1/1 played). Thus "-d0" means the last modified time is 1970/1/1 password, which allows the current password has expired, when he was also forced to make changes at the next logon password.

Another current password expires way is to use the passwd command.

$ Sudopasswd-e < user-name >
The above command and "chage -d0" role, getting the current user's password expires immediately.

Now check the user's information, you will find:

When you log in again, you will be asked to change the password. You will be asked to modify before once again verify the current password.


To set up a more comprehensive password policies (such as password complexity, prevent re-use), you can use PAM. See this article for more details.
     
         
         
         
  More:      
 
- Use matplotlib scientific drawing in Linux (Linux)
- Linux (CentOS) directory file management and file system file compression packing (Linux)
- Virtualization and IT cooperation (Linux)
- Editor of the popular Linux Gvim (Linux)
- CentOS 6.5 Linux System Customization and Packaging Quick Implementation Script (Linux)
- To install minimize RHEL / CentOS 7 (Linux)
- A deep understanding of Java enum (Programming)
- Linux System Tutorial: How to Check MariaDB server versions (Database)
- C ++ two second pointer memory model (two-dimensional array) (Programming)
- Resolve the host via KVM console can not connect clients (Linux)
- Optimized to minimize the installation of CentOS 5.8 (Linux)
- Asynchronous JavaScript loading (Programming)
- Bash mathematical extension (Programming)
- Linux operating system security can not be ignored (Linux)
- Protect your files, modify the Linux value Umask (Linux)
- Use lsof restore accidentally deleted log files or database (Linux)
- Kitematic how seamless and DockerFILE (Server)
- Text editing and viewing text Linux command (Linux)
- To explore the Android ListView caching mechanism again (Programming)
- Learning C ++ Standard Template Library and data structures (Programming)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.