0

I was checking some sites for setting password protection in single user mode login in my Linux server (Oracle Enterprise Linux-OEL) .

In some places I saw the steps to add entry into inititab file like below .

su:S:wait:/sbin/sulogin

In some other places I could see adding the entry in /etc/sysconfig/init file like below .

SINGLE=/sbin/sulogin

So what is the difference in adding to any of these files . Are they doing the same task ? Basically I want to know if I add into any of the above file will it serve the purpose ?

Mathews Jose
  • 161
  • 1
  • 2
  • 9

1 Answers1

2

First thing to note is /etc/sysconfig/init is strictly a Redhat Linux (and derivatives) convention. You won't find that file on a Debian or Slackware system for instance.

Second note, recently, many distributions are unfortunately switching to SystemD which does not use /etc/inittab. If you need the simplicity of /etc/inittab, you may want to research the best distro for your needs which does not use SystemD of which there are only a handful (eg: Devuan, Slackware, Gentoo, et al.).

Also it's worth mentioning -- if you are trying to secure your linux system by way of sulogin (requiring a password when booted from single-user mode) be aware that anyone with a bootable USB stick, or CDROM can quite simply bypass sulogin by booting from another form of media.

It's quite difficult to secure physical access without cages and security cameras.

Server Fault
  • 3,714
  • 12
  • 54
  • 89