[greengrass] What is the set password of ggc_user

0

system: Linux 22.04

set a core device: sudo -S -E java -Droot="/greengrass/v2" -Dlog.store=FILE -jar ./GreengrassInstaller/lib/Greengrass.jar --aws-region us-east-1 --thing-name $sn --thing-group-name *** --component-default-user ggc_user:ggc_group --provision true --setup-system-service true --deploy-dev-tools true

want to do: deploy a component that can copy the contents of the current component to the directory of another user on the device

blocking point: Error will be reported when copying directly without sudo:“permission deny” use sudo -S, error report: "Password input error"

question: What is the set password of "--component-default-user ggc_user:ggc_group"

已提問 1 年前檢視次數 609 次
1 個回答
2
已接受的答案

Why are you using -S option for sudo? "read password from standard input"

Just run sudo -E <command>.

The sudo command that you are using will not be running as ggc_user, it will run as root.

I do not understand how your desire "deploy a component that can copy" relates to the problem that you are having. Based on the command that you provided, you haven't yet even installed Greengrass, is that right? So really your desire right now is just to install and provision Greengrass I believe.

To run a component as root, do not use sudo. Update your component recipe to specify RequiresPrivilege. https://docs.aws.amazon.com/greengrass/v2/developerguide/component-recipe-reference.html

For example

Lifecycle:
  Run:
    Script: cp a_to_b b
    RequiresPrivilege: true
AWS
專家
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南