LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 05-01-2006, 01:50 AM   #16
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683Reputation: 683

There are some precautions that you need to abide by when setting up sudo. If you are in an environment where you have several users, you want to exclude certain program such as /bin/bash, vim, su and others. Vim has an escape to the shell ":!" that would drop the user into the shell, which in this case would be a root shell.

Also, you can set up sudo only to run certain authorized command for certain users or members of certain groups.

And above all, make sure that root has a strong password. You can also enforce strong passwords. This protects against brute force attacks.

One sometimes overlooked item is to lock down the sshd service. For example, explicitly deny access for system users, such as lp, mysql, etc.
 
Old 05-01-2006, 02:57 AM   #17
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
Quote:
Originally Posted by spooon
But if that's so, why assume the cracker won't similarly gain the "account details" for root if you use the root account?
I don't worry about this so much because as I mentioned above, I don't log into my root account very often (on my production machines) and I am sure many competent admins do the same.
 
Old 05-02-2006, 08:10 PM   #18
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 11,201
Blog Entries: 4

Rep: Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123Reputation: 4123
It's definitely true, I think, that, if you don't restrict yourself to "just an ordinary user account" during your day-to-day browsing of the forums ... "you are a p400l and a l00z3r"

In other words, you are gonna be caught with your pants down, sooner or sooner. "And ya'll have no one to blame but yerself, ya stupid git!"

Security controls are there, in both Windows and Linux, for a good reason. They're like the safety on a gun: they make it go "click!" instead of "BANG!" when you do rm /*. It really isn't "inconvenient" or "difficult" or "restrictive" to ask the computer to make sure that an executable file, which no one would ever have any plausible reason to modify, can't be modified. It's there.. it works.. why not use it?

You put your confidential files into a locked filing-cabinet even though you have your key-ring in your pocket. You lock your door in the morning when you go to work, even though you have the keys and can unlock the door at any time. You do this because you know that most cat-burglars are shameless opportunists. "Lazy b*stards." You know that they are looking for unlocked doors, and will never bother to go through the window which you left open upstairs to catch the breeze...

The most absurd thing is that Windows users routinely leave their doors and windows open, and buy expensive stuff to try to patrol them, when they have at their disposal a well-designed security system that in many ways is much more advanced than (standard) Linux. A system that is well-designed, robust, and, inexplicably, turned off...

Last edited by sundialsvcs; 05-02-2006 at 08:12 PM.
 
Old 05-02-2006, 08:46 PM   #19
wraithe
Member
 
Registered: Feb 2006
Location: Australia
Distribution: Linux... :-)
Posts: 241
Blog Entries: 1

Rep: Reputation: 50
i totally agree with you guys...
i have always used linux on a normal account and use su for tweeking only...
mind you i spose it was instilled into me b4 linux came along...
as for your windows comment...hmmm.the disc makes a good frisbee...
only time i find windows truly secure is if its not installed...
been hacking my young brothers system for years...(and boy does he get peeved)...
i tried to get him into linux when he was young but his gaming friends have brainwashed him that linux dont work very well...
i spose he is just a kid(25yrs younger)...
at least my son is happy to use linux, and windows has some games he likes but recons linux dont stop in the middle of a game so he likes it best...
mind you at school he is not allowed near the pc's as he has a tendency to destroy the pc's...
he watched me do a repartition one day and then some how did a simular thing at school(they couldnt explain what he did but had to get whole os reinstalled)...
so i got a mad cracker on my hands at 7 yo...
 
Old 05-02-2006, 10:31 PM   #20
Penguin of Wonder
Senior Member
 
Registered: Sep 2005
Location: West Virginia
Distribution: Gentoo
Posts: 1,249

Rep: Reputation: 45
Quote:
Originally Posted by wraithe
mind you at school he is not allowed near the pc's as he has a tendency to destroy the pc's...
he watched me do a repartition one day and then some how did a simular thing at school(they couldnt explain what he did but had to get whole os reinstalled)...
so i got a mad cracker on my hands at 7 yo...
I know thats not a good thing, but its still awsome!
 
Old 05-03-2006, 07:34 AM   #21
ledow
Member
 
Registered: Apr 2005
Location: UK
Distribution: Slackware 13.0
Posts: 241

Rep: Reputation: 34
Ah, the days of innocent youth:

Back in my secondary school, we used to use Windows 3.1 with a specialised logon dialog and security system (to keep us kids out). Anyway, I was the school geek by that time already but stupidly, one of our teachers said that if we knew what we were doing, we should be able to gain administrator access. He also challenged us to do so. What a stupid thing to do!

Anyway, there were many unsuccessful attempts by my peers to gain admin access and the closest any of them got was to shoulder-surf this same teacher logging into the network as an admin. Then they logged in as him and upgraded their accounts to Admin. Barely five minutes later they all had admin access, alarm bells rung in the server rooms and they all got into trouble (I wasn't one of them because I KNEW there would be some kind of monitoring on the system).

Sneakily, though, I had been preparing for just such an eventuality... no-one was going to shoulder-surf a password now the teacher was alert and they all gave up. For the previous month or so I had been coding a little program in Visual Basic. You see, the computers often would hang upon logging on and would require an admin to log in to unlock them. This was a known problem and happened all the time.

I crafted a small program that ran under a guest username - it took control of the screen and presented an identical and completely functional login screen to the one the school used, except it was specially coded to:

a) Hang "ordinary" logins in the same way as the computers sometimes hung.

b) Store all username/password attempts in a logfile in a public area.

c) Resist any and all attempts to shutdown/CTRL-ALT-DEL etc. (You could in those days easily override CTRL-ALT-DEL under Windows).

So the next lesson, I log in as a guest user, run the program and up pops the fake login screen. I "log in", it hangs, I go to the teacher nonchalantly while moving to another machine ("Oh, that one's hung again, sir") and wait for him to login. His login overrides the program, which stores his details and then lets him in.

I pick up the logfile from the public area, there's his password in plaintext. Fortunately, I was honest enough to then go and show him how I'd done it as well as how I would have avoided detection... for a start the network was only checking for EXTRA admins, not re-use of an admin account.

The account monitoring was done by running a NET command on a second monitor in the server room and that was easily overridden with a simple batch file which "pruned" the results of a real NET and I also knocked up a quick program that stopped any and all attempts to run unrecognised .EXE's that weren't run from a network drive or the local hard drive (my programs relied on the fact that I could run .EXE's from floppy, public drives etc.).

Such fun... and the teacher got a right ticking off for encouraging us in the first place.
 
Old 05-03-2006, 11:09 AM   #22
Penguin of Wonder
Senior Member
 
Registered: Sep 2005
Location: West Virginia
Distribution: Gentoo
Posts: 1,249

Rep: Reputation: 45
ledow, maybe your just to smart for your own good? or at least the good of the school
 
Old 05-03-2006, 12:04 PM   #23
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
Quote:
Anyway, there were many unsuccessful attempts by my peers to gain admin access and the closest any of them got was to shoulder-surf this same teacher logging into the network as an admin.
Heh, when I was at secondary school one of my mates caught the teachers login name by shoulder surfing. It didn't take me long to figure out what the password was. Guess? Login: boss, password: chief !!!! Can you believe that? What a moron. Of course, I didn't cause any trouble. Honest!

To answer the original question: I never log in as root, always use su/sudo. I never start X as root (except maybe once or twice back when I first installed Linux).

Last edited by ioerror; 05-03-2006 at 12:07 PM.
 
Old 05-03-2006, 07:26 PM   #24
wraithe
Member
 
Registered: Feb 2006
Location: Australia
Distribution: Linux... :-)
Posts: 241
Blog Entries: 1

Rep: Reputation: 50
hmmm...now i'm feeling old...
slate and a chisel for school...
well feel like it, we where not allowed to use a calculator at school...
and pc's... mmm ...yeh i built one at home...
came as a kit and took some soldering...
4 bit (trying to remember) ?cpu..would have used 4 bits and a stop bit...
1977-78 somewhere around then..may have been 76...
the z80 cpu came out not long after...probably only a couple of years....
school and computers where not even thought of...
no body believed i had a computer, and the people that knew did not say anything...
mind you i remember mum being told it was a phase i was going through and i would get over it eventually.. i spose i will but i may want to be buried with my pc too...
never did get over that phase but everyone else has joined me....
 
  


Reply

Tags
sudo, ubuntu


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
User admin and N/w admin on Gnome hangs ssrini *BSD 2 07-28-2005 07:55 AM
root (Admin) user crashes jimbrook SUSE / openSUSE 8 05-23-2005 07:04 PM
Admin-but not root KasperX Linux - Security 5 05-09-2005 04:23 PM
Admin user dee3lmo Linux - Security 1 07-12-2004 04:07 PM
User admin. How to change a user... Pug405 Linux - General 3 04-09-2004 01:33 AM

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

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