LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-05-2009, 11:26 PM   #1
soumalya
Member
 
Registered: Nov 2006
Posts: 260

Rep: Reputation: 31
root password


Sir

in my office few users know how to change root password.

is there any way to block changing root password? only administrator can have the access to change root password.


thanks
 
Old 03-05-2009, 11:32 PM   #2
wsduvall
Member
 
Registered: Aug 2006
Posts: 92

Rep: Reputation: 16
Only root users should be able to change the root password.
 
Old 03-06-2009, 12:08 AM   #3
smus
Member
 
Registered: Nov 2005
Location: Turkey
Distribution: Suse
Posts: 104

Rep: Reputation: 16
you can change the root password and create an account which has root privilages but not root and share your collegues this password.
 
Old 03-06-2009, 01:04 AM   #4
ArfaSmif
Member
 
Registered: Oct 2008
Location: Brisbane Australia
Distribution: Fedora, Centos, Manjaro
Posts: 317

Rep: Reputation: 70
It sounds like one of two things:-

1. either you have an /etc/sudoers file - in which case you should remove everyone who shouldn't have root permission, or

2. you have users who are in certain of the priviledged groups in /etc/group and can therefore get root permissions

What distribution are you running, because the answer may be slightly different depending on the distribution?
 
Old 03-06-2009, 02:37 AM   #5
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
Could they be changing the root password by performing a password reset procedure outside of the installed operating system?

If that's the case, you dont have much protection because physical access trumps everything.

In this case, you're better off establishing an office policy (and consequences) about circumventing established security controls. At that point, it would be trivial to setup a scheduled task to check the machines from time to time and verify the password has not been compromised/changes.
 
Old 03-06-2009, 03:20 AM   #6
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You could disable cdrom & usb booting in BIOS. Then password protect bios and grub so that a password is needed to choose a non-default grub option, or the grub menu. I think this also protects against adding "init=/bin/bash" to the kernel entry in grub. Locked down this way, the user would have to pop open the case and drain the bios memory.
 
Old 03-07-2009, 03:35 AM   #7
soumalya
Member
 
Registered: Nov 2006
Posts: 260

Original Poster
Rep: Reputation: 31
thank you all

my problem is ... user just use Linux single command in boot prompt and change the root password.

is there any way to block this problem?
 
Old 03-07-2009, 04:04 AM   #8
JulianTosh
Member
 
Registered: Sep 2007
Location: Las Vegas, NV
Distribution: Fedora / CentOS
Posts: 674
Blog Entries: 3

Rep: Reputation: 90
No, there is nothing you can do to prevent this type of action when there is no control over physical access.

Create a policy document that states circumvention of security controls is a violation of employment and can result in disiplinary action including termination. Make all employees read and sign the document and add it to their file. Then create a scheduled task to routinely connect to all the workstations in question and test that the password has not been tampered with.
 
Old 03-07-2009, 05:19 AM   #9
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
I'll just expand on that "no" that Admiral Beotch is talking about.

You can block resetting the root password by single user mode by passwording grub, however then they can go back and reinstall grub and thus get a new unpassworded grub. You can then password BIOS but then they can do a CMOS reset. Effectively the only way to block them being able to do this, is to lock the computers in big metal boxes that are locked. Those aren't free and do block off the CD/DVD drive, so you'd need external DVD drives going into the cases and you'd have to secure them so no body tries to steal the externals. So It's possible to stop them being able to reset the password but the lenghts you have to go to are a bit crazy.

I would suggest making it clear they are not allowed to use root privilages, reset the root passwords and clean out the sudoers file. Then you can place in roots .bashrc a link to a small script that sends a message of some sort whenever somebody logins as root and what machine they have done it on. Then you can displine them on this behaviour, they will be less likely to do it if they actually get into serious trouble for it.
 
Old 03-09-2009, 10:31 AM   #10
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Quote:
Originally Posted by soumalya View Post
thank you all

my problem is ... user just use Linux single command in boot prompt and change the root password.

is there any way to block this problem?
If it's a computer you control, put a bios password on the system, and install a case lock... anytime it reboots they have to ask you for the password. Shy true physical control, there is nothing you can do to prevent them from doing a bios reset, booting into single user mode, and changing the password. Physical access trumps all that isn't physical.

Last edited by rweaver; 03-09-2009 at 10:33 AM.
 
Old 03-10-2009, 04:11 PM   #11
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
At work, there are some rooms with equipment where a FOB is needed for access. It grants access and the use of a FOB is logged, adding accountability. One of these is the telephony room. If you have an important server, than you should restrict access to it.

You can lock down grub so that they can't boot into the single mode without a password. For servers, some admins pull the cable to the cdrom/dvdrom drive. Mostly so that a bad cdrom or DVD doesn't cause a slowdown, but also to prevent booting to it, or simply forgetting to remove it & causing problems it the server reboots.

We had a server previously that used a raid-5 array for the filesystem. There was a smallish ide drive installed but disabled in the bios. If there was a SCSI problem and the raid array wasn't bootable, enabling it in bios & booting to it would give you service tools.

You could do something similar.

Please read the grub howto in the www.tldp.org website. Locking down grub should prevent adding boot options such as booting into single user mode.
 
Old 03-10-2009, 06:26 PM   #12
wsduvall
Member
 
Registered: Aug 2006
Posts: 92

Rep: Reputation: 16
Or you could just reinstall grub, after you reset the CMOS and get your BIOS password removed. Locking down grub will only really stop only the most amateur. Really the only catchall fix is put you box in a safe...
 
Old 03-13-2009, 07:42 PM   #13
upchucky
Member
 
Registered: Feb 2004
Distribution: Debian
Posts: 113

Rep: Reputation: 16
or you can install an atmel chip, store the password in it, it will only give up it's data through a physical connection using a modified serial port adapter. that is how IBM stores it's passwords on the thinkpads. removing cmos battery will not reset the password.
 
Old 03-13-2009, 09:32 PM   #14
slimm609
Member
 
Registered: May 2007
Location: Chas, SC
Distribution: slackware, gentoo, fedora, LFS, sidewinder G2, solaris, FreeBSD, RHEL, SUSE, Backtrack
Posts: 430

Rep: Reputation: 67
there is always encryption also... You would need to type a password on every reboot but its alot harder to bypass
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How could normal user obtain root password or change root password ckamheng Debian 18 02-18-2009 10:28 PM
Change my root password in Debian Linux if I have the current password? panseluta Linux - Newbie 2 12-28-2008 02:02 AM
How to retrieve( or reset) root password in Mandrake Linux, as I forgot my password? Reghunath Linux - Software 4 05-08-2008 04:11 AM
Password Recovery in Edubuntu 7.04 - In Terminal, Root Login : su , password : ????? farhannaeem13 Linux - Security 3 11-30-2007 09:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 01:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration