I have some machines running Ubuntu that have a root user on them setup by
my web host. I''d like to disable the root user.
I tried:
user { ''root'':
ensure => absent,
}
But got the error message:
err: /Stage[main]/Users/User[root]/ensure: change from present to absent
failed: Could not delete user root: Execution of ''/usr/sbin/userdel
root''
returned 8: userdel: user root is currently logged in
However, I don''t believe the root user is logged in. Is it not
possible to
delete the root user? Is there something else I should do such as
disabling its password?
Thanks,
Ben
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/puppet-users/-/VOgfDBb9GuAJ.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
Hi Ben, Am 23.10.2012 09:08, schrieb Ben McCann:> However, I don''t believe the root user is logged in. Is it not possible to > delete the root user? Is there something else I should do such as > disabling its password? >The root user can not be removed. The default settings on ubuntu are not to let anyone login as root, unless you configured it otherwise. See the ubuntu server guide at https://help.ubuntu.com for details. hth, joe -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
I don''t believe you''ll be able to remove the root user without
massive system breakage due to how it''s an essential system account.
For example, your PID 1 likely runs as root.
Perhaps try something like this untested fragment, given how the star is
sometimes used to disable a password:
user { ''root'':
password => ''*'',
}
http://docs.puppetlabs.com/references/latest/type.html#user
On Tue, Oct 23, 2012 at 12:08:59AM -0700, Ben McCann
wrote:> I have some machines running Ubuntu that have a root user on them setup
by
> my web host. I''d like to disable the root user.
> I tried:
> user { ''root'':
> ensure => absent,
> }
> But got the error message:
> err: /Stage[main]/Users/User[root]/ensure: change from present to absent
> failed: Could not delete user root: Execution of
''/usr/sbin/userdel root''
> returned 8: userdel: user root is currently logged in
> However, I don''t believe the root user is logged in. Is it not
possible
> to delete the root user? Is there something else I should do such as
> disabling its password?
> Thanks,
> Ben
>
> --
> You received this message because you are subscribed to the Google
Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> [1]https://groups.google.com/d/msg/puppet-users/-/VOgfDBb9GuAJ.
> To post to this group, send email to puppet-users@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users+unsubscribe@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/puppet-users?hl=en.
>
> References
>
> Visible links
> 1. https://groups.google.com/d/msg/puppet-users/-/VOgfDBb9GuAJ
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
To unsubscribe from this group, send email to
puppet-users+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/puppet-users?hl=en.
Thanks Christopher. That worked. It looks like either an asterisk or an exclamation mark will work as I see either in /etc/shadow for various accounts. Thanks, Ben On Tuesday, October 23, 2012 4:44:40 AM UTC-7, Christopher Wood wrote:> > I don''t believe you''ll be able to remove the root user without massive > system breakage due to how it''s an essential system account. For example, > your PID 1 likely runs as root. > > Perhaps try something like this untested fragment, given how the star is > sometimes used to disable a password: > > user { ''root'': > password => ''*'', > } > > http://docs.puppetlabs.com/references/latest/type.html#user > > On Tue, Oct 23, 2012 at 12:08:59AM -0700, Ben McCann wrote: > > I have some machines running Ubuntu that have a root user on them > setup by > > my web host. I''d like to disable the root user. > > I tried: > > user { ''root'': > > ensure => absent, > > } > > But got the error message: > > err: /Stage[main]/Users/User[root]/ensure: change from present to > absent > > failed: Could not delete user root: Execution of ''/usr/sbin/userdel > root'' > > returned 8: userdel: user root is currently logged in > > However, I don''t believe the root user is logged in. Is it not > possible > > to delete the root user? Is there something else I should do such as > > disabling its password? > > Thanks, > > Ben > > > > -- > > You received this message because you are subscribed to the Google > Groups > > "Puppet Users" group. > > To view this discussion on the web visit > > [1]https://groups.google.com/d/msg/puppet-users/-/VOgfDBb9GuAJ. > > To post to this group, send email to puppet...@googlegroups.com<javascript:>. > > > To unsubscribe from this group, send email to > > puppet-users...@googlegroups.com <javascript:>. > > For more options, visit this group at > > http://groups.google.com/group/puppet-users?hl=en. > > > > References > > > > Visible links > > 1. https://groups.google.com/d/msg/puppet-users/-/VOgfDBb9GuAJ >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/ZT_3HsFLa2cJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.