[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"

gefragt vor einem Jahr608 Aufrufe
1 Antwort
2
Akzeptierte Antwort

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
EXPERTE
beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen