LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 06-19-2006, 01:15 PM   #1
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 97
Security, root and password ageing


I decided to up the security on my system by changing the root password and setting password ageing through YaST>Security and Users>Local Security. However, considering that I very rarely log in as root, is there a chance that the root password will be expired without giving any warning via my user account?

I already had some fun arising from this, as I set it without changing the password on my user account, then logged out. I expected simply that I would be prompted to change my password next time I logged in, but nooo... Instead, next time I booted up I was greeted with the message that "the system administrator has locked your account." Finally solved this by logging in as root and running usermod --inactive -1 <name>, then changing the password.

Also (bonus question): is there any way to change the username for root, to make it a little more difficult for would-be hackers?

Thanks,
Rob

Last edited by Robhogg; 06-19-2006 at 01:17 PM.
 
Old 06-19-2006, 01:37 PM   #2
verdeboy2k
Member
 
Registered: Jan 2004
Location: /dev/random
Distribution: Gentoo amd64, CrunchBang amd64
Posts: 350

Rep: Reputation: 32
I can answer the bonus question: root is simply the user with UID 0, GID 0 so yes, in theory, you could change the name of the super-user. Just change the entries in /etc/passwd and /etc/shadow from root to whatever and it should work. I have never tried this for the root account, so whatever security measures (like PAM or something else) you have might throw a fit if its changed from root.
 
Old 06-20-2006, 04:57 AM   #3
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Original Poster
Rep: Reputation: 97
Thanks for the response. Sounds like something I should try with a test installation first (when I get round to it), rather than with the installation I'm using everyday.

Rob
 
Old 06-20-2006, 07:10 AM   #4
Crito
Senior Member
 
Registered: Nov 2003
Location: Knoxville, TN
Distribution: Kubuntu 9.04
Posts: 1,168

Rep: Reputation: 53
Sounds like something the people who make up security "best practices" for Microsoft should have tested as well. Not only does changing the default local admin account (root) break things in Linux, doing so in Windows does too. For example, when you attempt to repair a Windows installation, the recovery console is hard coded to prompt for the Administrator account password. Not a administrator account, the Administrator account! So if you change it you'll have to completely reinstall the OS to do something like fixmbr. That makes it a pretty bad practice in my book.
 
Old 06-20-2006, 04:37 PM   #5
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Original Poster
Rep: Reputation: 97
Yet Mac OSX allows you to change the Administrator username to, say, Ermintrude. In this case the administrator is not root, but allows you to carry out a number of root-like tasks, and to activate or deactivate root login as necessary (deactivated by default). sudo works with the administrator, rather than root, password under OSX.

Anyone got any idea on the first question I posed (possibility of being locked out of root without warning by password ageing)?

Yours,
Rob
 
Old 06-20-2006, 04:56 PM   #6
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
You can always change the root password to something you know if you have physical acces to the box. Log on in single user mode or use some LiveCD and chroot.
 
Old 06-20-2006, 05:02 PM   #7
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Plausible. Just have expiries (cronjob) emailed to your unpriv'ed user account.
Wrt to bonus: don't. Please search this forum for previous discussions about it.
 
Old 06-20-2006, 06:07 PM   #8
Crito
Senior Member
 
Registered: Nov 2003
Location: Knoxville, TN
Distribution: Kubuntu 9.04
Posts: 1,168

Rep: Reputation: 53
Quote:
Originally Posted by Robhogg
Yet Mac OSX allows you to change the Administrator username to, say, Ermintrude.
And I can create a user account named root under Windows too, make that user a member of the account operators group and disable local Administrator. Net effect would be exactly the same: I've created an additional layer of complexity to solve a non-existant security problem. Weak passwords and users with no understanding of social engineering is the real problem. The solution, therefore, is to enforce strong passwords and educate your users. Not create an administrative nightmare. IMVHO.
 
Old 06-25-2006, 07:58 AM   #9
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Original Poster
Rep: Reputation: 97
Thanks for the reply.
Quote:
Originally Posted by unSpawn
Plausible. Just have expiries (cronjob) emailed to your unpriv'ed user account.
How would I do this? Apropos doesn't show anything for 'expiries'
Quote:
Wrt to bonus: don't. Please search this forum for previous discussions about it.
OK I won't

I don't agree, though, that it is pointless to change the name of the admin account. Knowing that any linux system will have an account called root vastly simplifies the job of anyone who wants to hack in. It means that, with passwords of equivalent complexity, it will actually be easier for a hacker to access root than an unprivileged user account.

Rob

Last edited by Robhogg; 06-25-2006 at 08:03 AM.
 
Old 06-27-2006, 08:05 AM   #10
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
How would I do this? Apropos doesn't show anything for 'expiries'
"man chage" ;-p

Here's a lame example:
Code:
cat /etc/passwd | cut -d ":" -f 1,3 | tr ":" " " | sort -k2 -S1 | while read logname uid; 
do echo -n "$logname "; chage -l $logname | grep "^Password Exp" | cut -d ":" -f 2-; 
done | grep -v Never | awk '{print $4, $2, $3, $1}' | sort

I don't agree, though,
...and that's exactly why I told you to search this forum: to avoid unnecessary dicussion. TIA
 
  


Reply



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
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
Root password no good for "software security device?" Rusted Linux - Security 3 04-26-2006 05:00 AM
Logged in as root, prompted for root password ta0kira Slackware 13 04-25-2005 01:29 AM
Password ageing for existing AIX users szahri AIX 1 04-12-2005 01:44 PM

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

All times are GMT -5. The time now is 06:18 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