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

demandé il y a un an610 vues
1 réponse
2
Réponse acceptée

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
EXPERT
répondu il y a un an

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions