LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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-21-2003, 08:46 PM   #1
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
Problems starting services as root


I've read in many places that it's a good idea to tighten security by disallowing the root login using SSH and simply login via SSH as an unprivlidged user and then su to become root to perform actions that can only be done using the root login.

I have disabled root logins by (first) changing the /etc/passwd file to /sbin/nologin for the root account and (second) went into sshd.conf and turned off root logins.

I'm currently using Putty for all my SSH activity, and I've been logging in as an unprivlidged user and then su to become root. When I do this, if I try keying in "service smb start" or "service qmail stop", it returns an error... something like "unknown command". The only way I can start and stop services this way is if I login as root. When I do this, I can do everything I need.

It's almost acting like I'm not getting all of the root privlidges when I su root. How can this be? What settings do I need to change to make root have all the needed privlidges?
 
Old 09-21-2003, 10:01 PM   #2
msh8r
Member
 
Registered: Jul 2001
Location: Houston, TX
Distribution: RedHat, CentOS, Fedora
Posts: 48

Rep: Reputation: 15
in order to get a full root shell (i.e. with all your environment variables, path, etc. set) use "su -" instead of "su"
 
Old 09-21-2003, 10:20 PM   #3
nakkaya
LQ Guru
 
Registered: Jan 2003
Location: Turkey&USA
Distribution: Emacs and linux is its device driver(Slackware,redhat)
Posts: 1,398

Rep: Reputation: 45
actualy you are getting the root previliages but you just dont get the path variables so to run or stop services use /sbin/service sbin is the directory where system specific command lives.
 
Old 09-21-2003, 11:49 PM   #4
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Original Poster
Rep: Reputation: 31
Ok, I see now. Thanks for the help!
 
  


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
starting services using rc.local supersucker Linux - Newbie 8 11-03-2005 11:05 AM
Starting services from terminal ExploiT Linux - General 4 09-18-2004 10:04 PM
Starting services at bootup Lucasite Linux - Newbie 5 04-17-2004 02:08 PM
Starting Services InEeDhElPlInUx Linux - Newbie 9 11-06-2003 11:57 AM
stopping and starting services nero64 Linux - Newbie 3 11-13-2002 01:10 AM

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

All times are GMT -5. The time now is 12:54 AM.

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