Skip to content

Instantly share code, notes, and snippets.

@tryp
Created February 15, 2012 22:00
Show Gist options
  • Save tryp/1839297 to your computer and use it in GitHub Desktop.
Save tryp/1839297 to your computer and use it in GitHub Desktop.
Modify /etc/shadow to allow unrestricted root login
#!/bin/sh
# /etc shadow fields are as follows:
# user:passwd:lastchange:minage:maxage:warndays:inactiveperiod:expdate:reserved
# remove root password, change requirement, and age restrictions
sed -e 's/^root:[^:]*:[^:]*:[^:]*:[^:]*:/root:::::/' -i etc/shadow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment