Hi everyone. I am attempting to add this line to /etc/inittab so that a
user will be forced to enter a password to get into single user mode:
~:S:wait:/sbin/sulogin
I have tried all kinds of things, but seem to be having no luck. Here is
the puppet class I am trying to make:
class gen000020 {
# Description: The UNIX host is bootable in single user mode
without a password.
# Insert "~~:S:wait:/sbin/sulogin" into /etc/inittab
augeas { "inittab" :
context => "/files/etc/inittab",
changes => [
"set ~ /~",
"set ~/runlevels S",
"set ~/action wait",
"set ~/process /sbin/sulogin",
]
}
}
Here is the pertinent debug output from a manual run feeding that code to
puppet:
debug: Augeas[inittab](provider=augeas): Opening augeas with root /, lens
path , flags 0
debug: Augeas[inittab](provider=augeas): Augeas version 0.5.0 is installed
debug: Augeas[inittab](provider=augeas): Will attempt to save and only run
if files changed
debug: Augeas[inittab](provider=augeas): sending command 'set' with params
["/files/etc/inittab/~", "/~"]
debug: Augeas[inittab](provider=augeas): sending command 'set' with params
["/files/etc/inittab/~/runlevels", "S"]
debug: Augeas[inittab](provider=augeas): sending command 'set' with params
["/files/etc/inittab/~/action", "wait"]
debug: Augeas[inittab](provider=augeas): sending command 'set' with params
["/files/etc/inittab/~/process", "/sbin/sulogin"]
debug: Augeas[inittab](provider=augeas): Files changed, should execute
debug: Augeas[inittab](provider=augeas): Closed the augeas connection
debug: //ia/Augeas[inittab]: Changing returns
debug: //ia/Augeas[inittab]: 1 change(s)
debug: Augeas[inittab](provider=augeas): Opening augeas with root /, lens
path , flags 0
debug: Augeas[inittab](provider=augeas): Augeas version 0.5.0 is installed
debug: Augeas[inittab](provider=augeas): sending command 'set' with params
["/files/etc/inittab/~", "/~"]
debug: Augeas[inittab](provider=augeas): sending command 'set' with params
["/files/etc/inittab/~/runlevels", "S"]
debug: Augeas[inittab](provider=augeas): sending command 'set' with params
["/files/etc/inittab/~/action", "wait"]
debug: Augeas[inittab](provider=augeas): sending command 'set' with params
["/files/etc/inittab/~/process", "/sbin/sulogin"]
debug: Augeas[inittab](provider=augeas): Closed the augeas connection
err: //ia/Augeas[inittab]/returns: change from need_to_run to 0 failed: Save
failed with return code false
debug: Finishing transaction -612453418 with 1 changes
Can anyone show me the proper way to insert this line into inittab using
augeas and puppet?
Thanks
Kit Stube
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.