--system 오류가 있는 Ubuntu Core 추가 사용자가 있는 Dell Gateway 3001

--system 오류가 있는 Ubuntu Core 추가 사용자가 있는 Dell Gateway 3001

SSH 연결을 통해 Dell Gateway 3001에 AWS IoT Greengrass를 설치하는 첫 번째 단계를 수행하려고 합니다. 먼저 --system 플래그를 사용하여 extrauser를 생성해야 하지만 아래에서 볼 수 있듯이 실패합니다. 그래도 --system 없이 사용자를 생성할 수 있습니다.

Ubuntu Core 16, 커널 버전: 4.4.0-150-generic

root@dell:/home/admin# sudo adduser --extrausers --system ggc_user
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_CTYPE = "UTF-8",
    LANG = "C.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("C.UTF-8").
Adding system user `ggc_user' (UID 111) ...
Adding new user `ggc_user' (UID 111) with group `nogroup' ...
usermod: user 'ggc_user' does not exist
adduser: `/usr/sbin/usermod -p * ggc_user' returned error code 6. Exiting.
root@dell:/home/admin#

아 그리고 그런데 이 사용자 이름이 포함된 새 줄이 추가됩니다./var/lib/extrausers/passwd절차에서 오류가 발생하더라도. 그리고 이 사용자를 삭제할 수 없습니다. sudo userdel --extrausers ggc_ucer다시 사용자가 존재하지 않는다고 나옵니다. 해당 줄을 제거하려면 파일에서 해당 줄을 수동으로 제거해야 합니다.

답변1

useradd다음 대신 명령을 사용하여 사용자를 생성할 수 있었습니다 adduser.

먼저 그룹을 만듭니다.groupadd --extrausers --system ggc_group

그런 다음 사용자는 다음을 수행합니다.useradd --extrausers --system -g ggc_group ggc_user

이제 첫 번째 단계는 끝난 것 같아요 :D

이 답변이 도움이 되었습니다.https://unix.stackexchange.com/questions/121071/what-does-adduser-do-that-useradd-doesnt

관련 정보