mandarons / icloud-drive-docker

Dockerized iCloud Client - make a local copy of your iCloud documents and photos, and keep it automatically up-to-date.
BSD 3-Clause "New" or "Revised" License
962 stars 46 forks source link

[BUG] Can't login to iCloud using docker exec #232

Closed gniting closed 1 week ago

gniting commented 1 week ago

Describe the bug With the latest version, I cannot log into iCloud anymore.

To Reproduce Run command:

❯ docker exec -it --user=icd icloud-nas /bin/sh -c "icloud --username=xxxxxxxx@icloud.com --session-directory=/config/session_data"
unable to find user icd: no matching entries in passwd file

Expected behavior Able to log into iCloud

Screenshots N/A

Configuration Docker running on Ubuntu

Additional context Version: v1.20.0

gniting commented 1 week ago

I checked the /etc/passwd file in the container, indeed there is no icd user there.

root@icloud-nas:/app# cat /etc/passwd
root:x:0:0:root:/root:/bin/ash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
sync:x:5:0:sync:/sbin:/bin/sync
shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
halt:x:7:0:halt:/sbin:/sbin/halt
mail:x:8:12:mail:/var/mail:/sbin/nologin
news:x:9:13:news:/usr/lib/news:/sbin/nologin
uucp:x:10:14:uucp:/var/spool/uucppublic:/sbin/nologin
operator:x:11:0:operator:/root:/sbin/nologin
man:x:13:15:man:/usr/man:/sbin/nologin
postmaster:x:14:12:postmaster:/var/mail:/sbin/nologin
cron:x:16:16:cron:/var/spool/cron:/sbin/nologin
ftp:x:21:21::/var/lib/ftp:/sbin/nologin
sshd:x:22:22:sshd:/dev/null:/sbin/nologin
at:x:25:25:at:/var/spool/cron/atjobs:/sbin/nologin
squid:x:31:31:Squid:/var/cache/squid:/sbin/nologin
xfs:x:33:33:X Font Server:/etc/X11/fs:/sbin/nologin
games:x:35:35:games:/usr/games:/sbin/nologin
cyrus:x:85:12::/usr/cyrus:/sbin/nologin
vpopmail:x:89:89::/var/vpopmail:/sbin/nologin
ntp:x:123:123:NTP:/var/empty:/sbin/nologin
smmsp:x:209:209:smmsp:/var/spool/mqueue:/sbin/nologin
guest:x:405:1000:guest:/dev/null:/sbin/nologin
nobody:x:65534:65534:nobody:/:/sbin/nologin
abc:x:1000:1002::/config:/bin/false
gniting commented 1 week ago

Update: I can log in manually from inside the container using the command:

icloud --username=xxxxxx@icloud.com --session-directory=/config/session_data

mandarons commented 1 week ago

Sorry, I forgot to remove --user=icd from the docs. Updated the README.