1

I'm using docker with ubuntu and I need to mount

/etc/group 
/etc/shadow   
/etc/gshadow
/etc/passwd

inside an external volume, in order to avoid the password loosing each time I've to rebuild the docker container.

From the point of view of Ubuntu, I just need to permanently move these file to another folder like:

/bck/group 
/bck/shadow
/bck/gshadow
/bck/passwd

I've tried to make a symbolic link in /etc

lrwxrwxrwx  1 root root    21 Mar  7 15:50 group -> /bck/userbackup/group

But when I try to create a new user I've the following error.

For my (very very poor) knoledge there seems a problem related to access rights:

:/etc# adduser createuserxx
Adding user `createuserxx' ...
Adding new group `createuserxx' (1001) ...
groupadd: cannot open /etc/group
adduser: `/usr/sbin/groupadd -g 1001 createuserxx' returned error code 10. Exiting.

0

You must log in to answer this question.

Browse other questions tagged .