Forum: CFEngine Help
Subject: Re: CFEngine Help: Editing /etc/shadow file using variables
Author: josephvj
Link to topic: https://cfengine.com/forum/read.php?3,24725,24726#msg-24726
Following is the verbose o/p.
cf3> -> Bundlesequence => {'manage_users'}
cf3>
cf3> *****************************************************************
cf3> BUNDLE manage_users
cf3> *****************************************************************
cf3>
cf3>
cf3> =========================================================
cf3> vars in bundle manage_users (1)
cf3> =========================================================
cf3>
cf3>
cf3> + Private classes augmented:
cf3>
cf3> - Private classes diminished:
cf3>
cf3>
cf3>
cf3> =========================================================
cf3> methods in bundle manage_users (1)
cf3> =========================================================
cf3>
cf3>
cf3> .........................................................
cf3> Promise handle:
cf3> Promise made by: users
cf3> .........................................................
cf3>
cf3>
cf3> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
cf3> BUNDLE create_users( {'manage_users.users'} )
cf3> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
cf3>
cf3> Initiate variable convergence...
cf3> ? Augment scope create_users with user (s)
cf3>
cf3> =========================================================
cf3> vars in bundle create_users (1)
cf3> =========================================================
cf3>
cf3>
cf3> =========================================================
cf3> classes in bundle create_users (1)
cf3> =========================================================
cf3>
cf3> Initiate variable convergence...
cf3>
cf3> + Private classes augmented:
cf3> + add_user
cf3>
cf3> - Private classes diminished:
cf3>
cf3>
cf3>
cf3> =========================================================
cf3> files in bundle create_users (1)
cf3> =========================================================
cf3>
cf3>
cf3> .........................................................
cf3> Promise handle:
cf3> Promise made by: /etc/shadow
cf3> .........................................................
cf3>
cf3> -> Using literal pathtype for /etc/shadow
cf3> -> Handling file existence constraints on /etc/shadow
cf3> -> Handling file edits in edit_line bundle set_user_field
cf3>
cf3> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
cf3> BUNDLE set_user_field( {'testuser','2','EnCrYpTeD_PAssWord_hErE'} )
cf3> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
cf3>
cf3> Initiate variable convergence...
cf3> ? Augment scope set_user_field with user (s)
cf3> ? Augment scope set_user_field with field (s)
cf3> ? Augment scope set_user_field with val (s)
cf3> ?? Private class context
cf3>
cf3>
cf3> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
cf3> field_edits in bundle set_user_field
cf3> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
cf3>
cf3>
cf3> .........................................................
cf3> Promise handle:
cf3> Promise made by: testuser:.*
cf3> .........................................................
cf3>
cf3> ?? Private class context
cf3>
cf3>
cf3> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
cf3> field_edits in bundle set_user_field
cf3> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
cf3>
cf3>
cf3> .........................................................
cf3> Promise handle:
cf3> Promise made by: testuser:.*
cf3> .........................................................
cf3>
cf3> -> This promise has already been verified
cf3> ?? Private class context
cf3>
cf3>
cf3> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
cf3> field_edits in bundle set_user_field
cf3> = = = = = = = = = = = = = = = = = = = = = = = = = = = =
cf3>
cf3>
cf3> .........................................................
cf3> Promise handle:
cf3> Promise made by: testuser:.*
cf3> .........................................................
cf3>
cf3> -> This promise has already been verified
cf3> -> No edit changes to file /etc/shadow need saving
cf3> -> Handling file existence constraints on /etc/shadow
cf3>
cf3> =========================================================
cf3> commands in bundle create_users (1)
cf3> =========================================================
cf3>
cf3> -> Promiser string contains a valid executable (/usr/sbin/useradd) - ok
cf3>
cf3> .........................................................
cf3> Promise handle:
cf3> Promise made by: /usr/sbin/useradd -m -d /home/testuser -s /bin/bash
-c 'Test User' testuser
cf3> .........................................................
cf3>
cf3> -> Executing '/usr/sbin/useradd -m -d /home/testuser -s /bin/bash -c
'Test User' testuser' ...(timeout=-678,owner=-1,group=-1)
cf3> -> (Setting umask to 77)
cf3> -> Finished command related to promiser "/usr/sbin/useradd -m -d
/home/testuser -s /bin/bash -c 'Test User' testuser" -- succeeded
cf3> -> Completed execution of /usr/sbin/useradd -m -d /home/testuser -s
/bin/bash -c 'Test User' testuser
cf3>
cf3> =========================================================
cf3> reports in bundle create_users (1)
cf3> =========================================================
cf3>
cf3>
cf3> .........................................................
cf3> Promise handle:
cf3> Promise made by: User has been created and password is set
cf3> .........................................................
cf3>
cf3> Report: User has been created and password is set
cf3> R: User has been created and password is set
cf3>
cf3> . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cf3> Skipping whole next promise (User not created / User exists), as context
!add_user is not relevant
cf3> . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cf3>
cf3> =========================================================
cf3> vars in bundle create_users (2)
cf3> =========================================================
cf3>
cf3>
cf3> =========================================================
cf3> classes in bundle create_users (2)
cf3> =========================================================
cf3>
cf3> Initiate variable convergence...
cf3>
cf3> + Private classes augmented:
cf3> + add_user
cf3>
cf3> - Private classes diminished:
cf3>
cf3>
cf3>
cf3> =========================================================
cf3> files in bundle create_users (2)
cf3> =========================================================
cf3>
cf3>
cf3> .........................................................
cf3> Promise handle:
cf3> Promise made by: /etc/shadow
cf3> .........................................................
cf3>
cf3> -> Using literal pathtype for /etc/shadow
cf3> -> This promise has already been verified
cf3>
cf3> =========================================================
cf3> commands in bundle create_users (2)
cf3> =========================================================
cf3>
cf3> -> Promiser string contains a valid executable (/usr/sbin/useradd) - ok
cf3> -> This promise has already been verified
cf3>
cf3> =========================================================
cf3> reports in bundle create_users (2)
cf3> =========================================================
cf3>
cf3> -> This promise has already been verified
cf3>
cf3> . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cf3> Skipping whole next promise (User not created / User exists), as context
!add_user is not relevant
cf3> . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cf3>
cf3> =========================================================
cf3> vars in bundle create_users (3)
cf3> =========================================================
cf3>
cf3>
cf3> =========================================================
cf3> classes in bundle create_users (3)
cf3> =========================================================
cf3>
cf3> Initiate variable convergence...
cf3>
cf3> + Private classes augmented:
cf3> + add_user
cf3>
cf3> - Private classes diminished:
cf3>
cf3>
cf3>
cf3> =========================================================
cf3> files in bundle create_users (3)
cf3> =========================================================
cf3>
cf3>
cf3> .........................................................
cf3> Promise handle:
cf3> Promise made by: /etc/shadow
cf3> .........................................................
cf3>
cf3> -> Using literal pathtype for /etc/shadow
cf3> -> This promise has already been verified
cf3>
cf3> =========================================================
cf3> commands in bundle create_users (3)
cf3> =========================================================
cf3>
cf3> -> Promiser string contains a valid executable (/usr/sbin/useradd) - ok
cf3> -> This promise has already been verified
cf3>
cf3> =========================================================
cf3> reports in bundle create_users (3)
cf3> =========================================================
cf3>
cf3> -> This promise has already been verified
cf3>
cf3> . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cf3> Skipping whole next promise (User not created / User exists), as context
!add_user is not relevant
cf3> . . . . . . . . . . . . . . . . . . . . . . . . . . . .
cf3> -> Method invoked successfully
cf3>
cf3> =========================================================
cf3> vars in bundle manage_users (2)
cf3> =========================================================
cf3>
cf3>
cf3> + Private classes augmented:
cf3>
cf3> - Private classes diminished:
cf3>
cf3>
cf3>
cf3> =========================================================
cf3> methods in bundle manage_users (2)
cf3> =========================================================
cf3>
cf3>
cf3> =========================================================
cf3> vars in bundle manage_users (3)
cf3> =========================================================
cf3>
cf3>
cf3> + Private classes augmented:
cf3>
cf3> - Private classes diminished:
cf3>
cf3>
cf3>
cf3> =========================================================
cf3> methods in bundle manage_users (3)
cf3> =========================================================
cf3>
cf3> Outcome of version (not specified) (agent-0): Promises observed to be kept
50%, Promises repaired 50%, Promises not repaired 0%
cf3> -> Checked 1 objects with 37 promises, efficiency 2.63
cf3> -> No lock purging scheduled
_______________________________________________
Help-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/help-cfengine