LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-17-2019, 03:38 PM   #1
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
Server recommended vs. common practices


I am seeking observations about common practices in the enterprise with respect to server root accounts versus traditional industry recommendations. The thread is about common observed practices and not recommended practices and with respect to business networks rather than home or labs.

* Is logging into servers directly with the root account common?

* Is creating a server with only the root account common (no user accounts)?

* If creating user accounts is common, are the accounts single user accounts accessible by all users or accounts specific to each user needing access?

Both remote SSH access and local access are included in the questions.

Thanks for your time.

Background: At work I am gathering information for the owners about common industry configuration and security practices.

I'm not looking for judgments or criticism. Just what is commonly observed in the enterprise. I work for a really small less than 10 employees mom-and-pop and not in a large or mid-size business.

At work I inherited responsibility for several Linux servers. Several of these systems are public-facing. Nominal good news: all have remote SSH configured for keys only. Not good news: almost all of them only have a root account. Not good news: all servers use the same root password for local logins. Nominal good news: none of the systems have ever been knowingly compromised.

My understanding of the traditional recommendation is disable the root account but if impractical then create user accounts for each user who needs access and elevate privileges as needed from the user account. For auditing and control, creating a user account for each user needing access is preferred rather than a single account accessible to all.

As is often is the case at many businesses, at stake here is a heavy focus on convenience versus basic security practices. Part of my notes is being able to present to the owners the perceived risks vs, perceived benefits.
 
Old 09-17-2019, 05:18 PM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,732

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Quote:
Originally Posted by upnort View Post
1. Is logging into servers directly with the root account common?

2. Is creating a server with only the root account common (no user accounts)?

3. If creating user accounts is common, are the accounts single user accounts accessible by all users or accounts specific to each user needing access?
As observed in two business environments where I worked with Unix/Linux systems:
1. Not as far as I observed, but I never had root access in either location. I only saw that when an admin I was working with needed root, he su'd to it, did what he needed to do, and exited.

2. Definitely not common as far as I saw.

3. Single user accounts shared by all users. For example, the Informatica admins all logged in with the same account. The DBAs all logged in with the oracle account. Etc.
 
Old 09-18-2019, 05:01 AM   #3
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,476

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
My best practise is:

1) Disable root login remotely, except in extremely limited and controlled circumstances.
2) Servers should be created with either local user accounts or some form of common authentication mechanism (AD/LDAP).
3) Users must only have access via their own account and sudo use permissioned accordingly.
 
Old 09-18-2019, 07:20 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,666

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by upnort View Post
I am seeking observations about common practices in the enterprise with respect to server root accounts versus traditional industry recommendations. The thread is about common observed practices and not recommended practices and with respect to business networks rather than home or labs.

* Is logging into servers directly with the root account common?
Only from the direct, physical console, never over network. And access to the physical servers should be GREATLY restricted and monitored/logged.
Quote:
* Is creating a server with only the root account common (no user accounts)?
That's like asking, 'How high is up?"....depends on what the server does. If all it is ever going to do is be a mail relay, it doesn't NEED any other users. Less users = less accounts to compromise/audit. That said, we will typically encourage clients to have at least ONE 'regular' user on the system, with sudo rights, in the event things go pear shaped.
Quote:
* If creating user accounts is common, are the accounts single user accounts accessible by all users or accounts specific to each user needing access?
Again, depends. If it's a generic user with just-in-case access, then anyone who knows the account ID and password can log in. For specific users, we always recommend tying an account to an address/range, so that only xxx users can log in from VPN, yyy users can log in locally, etc.
Quote:
Both remote SSH access and local access are included in the questions.
Was only assuming SSH access, since local access to a server shouldn't be given at all in an enterprise setting, if you're even remotely serious about security. If you're talking about local workstations, they obviously have root access AVAILABLE, but we don't suggest giving a local user access to that, but have a sudoers file that's pretty comprehensive. Lets them get work done, but won't allow system services to be modified/changed.
Quote:
Background: At work I am gathering information for the owners about common industry configuration and security practices.

I'm not looking for judgments or criticism. Just what is commonly observed in the enterprise. I work for a really small less than 10 employees mom-and-pop and not in a large or mid-size business.

At work I inherited responsibility for several Linux servers. Several of these systems are public-facing. Nominal good news: all have remote SSH configured for keys only. Not good news: almost all of them only have a root account. Not good news: all servers use the same root password for local logins. Nominal good news: none of the systems have ever been knowingly compromised.

My understanding of the traditional recommendation is disable the root account but if impractical then create user accounts for each user who needs access and elevate privileges as needed from the user account. For auditing and control, creating a user account for each user needing access is preferred rather than a single account accessible to all.

As is often is the case at many businesses, at stake here is a heavy focus on convenience versus basic security practices. Part of my notes is being able to present to the owners the perceived risks vs, perceived benefits.
Best advice is, "Talk to the users and find out what they *NEED*, and be sure to separate it from what they *WANT*". And remind said users that they don't have a computer at the office....the company lets them use one of theirs during working hours. So whining about "Well, I can't install whatever I want! I can't visit porn sites! Ugggggghhhhh!!!", needs to fall on deaf ears. If user xxx needs to just run a few programs that may need root access, it's fairly simple to shove a command into a shell script that calls sudo to run it on a double-click on the console, or will fire it up from the CLI, but NOT allow them any elevated access. Get them what they NEED to work, because at the end of the day if the systems are broken, it falls to YOU, not them, to fix.
 
Old 09-18-2019, 08:52 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,923

Rep: Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319Reputation: 7319
every company has its own "style" or recommendation (or policy). There is no common base, or it is just a trivial/basic set of configurations.

We have hosts where I can log in as root, but also there are others where I cannot do that. Also there are some users [locally] installed, but others coming from LDAP or somewhere else.
Accounts creation and configuration based on web services, mainly by automated scripts, but also sometimes human intervention is required.
Users are restricted so they can login only to a limited set of servers (including unix/linux/windows/whatever).


Our company has a security department and for example they are responsible for configuring firewalls, proxy, groups and similar things.... (including for example virtual hosts, docker images too).
 
Old 09-18-2019, 08:59 AM   #6
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Direct root login is still allowed by some distros (e.g. RedHat derivations) but discouraged by others (e.g. Ubuntu).

Having said that even on my RHEL systems I mostly rely on sudo even when I want to become root (e.g. "sudo su -") rather than direct login as root. However for some issues (e.g. fsck of root filesystem fails) having access to the root password is required.

Also these days many systems interact with each other so it isn't unusual to have a root ssh trust between them so that a root cron job on one system can automatically run root commands on another. If it doesn't require root access ssh trusts can be setup between non-root users.
 
1 members found this post helpful.
Old 09-21-2019, 06:41 PM   #7
upnort
Senior Member
 
Registered: Oct 2014
Distribution: Slackware
Posts: 1,893

Original Poster
Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
Thank you for the replies. Based on this thread, there is a difference between common observed practices and so-called recommended practices.

Working in a very small mom-and-pop is quite different from the enterprise shows. After more than two years I still haven't convinced the owner to at least encrypt the master password spreadsheet. Convenience is more important.

Similarly, one password to rule them all. I keep trying to explain that if one system is compromised all are compromised.
 
  


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
LXer: 6 common questions about agile development practices for teams LXer Syndicated Linux News 0 03-20-2018 06:12 AM
LXer: Linux Foundation Wants to Standardize Common Best Practices for Open Software Compliance LXer Syndicated Linux News 0 10-09-2015 02:11 PM
RH 9.0 glibc rpm says it needs glibc-common, but glibc-common is installed whitshade Red Hat 2 04-28-2007 05:49 PM
BOGUS.common.04y -> /home/common/Mailbox jayakrishnan Linux - Networking 0 11-19-2005 04:48 AM
Common practices in Linux SoliTear Linux - General 5 01-09-2005 11:43 PM

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

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