etcpasswd

Can not add new user in docker container with mounted /etc/passwd and /etc/shadow

此生再无相见时 提交于 2019-12-22 09:41:19
问题 Example of the problem: docker run -ti -v my_passwd:/etc/passwd -v my_shadow:/etc/shadow --rm centos [root@681a5489f3b0 /]# useradd test # does not work !? useradd: failure while writing changes to /etc/passwd [root@681a5489f3b0 /]# ll /etc/passwd /etc/shadow # permission check -rw-r--r-- 1 root root 157 Oct 8 10:17 /etc/passwd -rw-r----- 1 root root 100 Oct 7 18:02 /etc/shadow The similar problem arises when using passwd: [root@681a5489f3b0 /]# passwd test Changing password for user test.

Can not add new user in docker container with mounted /etc/passwd and /etc/shadow

我的梦境 提交于 2019-12-05 18:27:42
Example of the problem: docker run -ti -v my_passwd:/etc/passwd -v my_shadow:/etc/shadow --rm centos [root@681a5489f3b0 /]# useradd test # does not work !? useradd: failure while writing changes to /etc/passwd [root@681a5489f3b0 /]# ll /etc/passwd /etc/shadow # permission check -rw-r--r-- 1 root root 157 Oct 8 10:17 /etc/passwd -rw-r----- 1 root root 100 Oct 7 18:02 /etc/shadow The similar problem arises when using passwd: [root@681a5489f3b0 /]# passwd test Changing password for user test. New password: BAD PASSWORD: The password is shorter than 8 characters Retype new password: passwd:

Safely change home directory

老子叫甜甜 提交于 2019-11-28 15:10:40
I'm trying to safely update the home directory as specified in /etc/passwd , but the standard Linux utils - usermod and vipw - for doing so aren't provided by Cygwin. Could anyone tell me how they changed this in Cygwin? netjeff EDIT: For recent versions of Cygwin (1.7.34 and beyond), see this newer question . Like sblundy's answer, you can always edit by-hand. But if you want to do it the "official" way, use the cygwin-specific mkpasswd command. Below is a snippet from the official docs on mkpasswd : For example, this command: Example 3.11. Using an alternate home root $ mkpasswd -l -p "$

Safely change home directory

拈花ヽ惹草 提交于 2019-11-27 09:02:37
问题 I'm trying to safely update the home directory as specified in /etc/passwd , but the standard Linux utils - usermod and vipw - for doing so aren't provided by Cygwin. Could anyone tell me how they changed this in Cygwin? 回答1: EDIT: For recent versions of Cygwin (1.7.34 and beyond), see this newer question. Like sblundy's answer, you can always edit by-hand. But if you want to do it the "official" way, use the cygwin-specific mkpasswd command. Below is a snippet from the official docs on