Go Back   Cyber Tech Help Support Forums > Operating Systems > Linux

Notices

Reply
 
Topic Tools
  #1  
Old July 4th, 2003, 07:03 PM
R4NG3R's Avatar
R4NG3R R4NG3R is offline
Senior Member
 
Join Date: Feb 2003
Location: TEXAS
Age: 18
Posts: 717
User Settings

I've been running my servers and programs as root, well it finally got to me and i said, "I need to run as a USER!!!" so i did. but when i did, it sucked. I couldn't edit files i needed to edit, i couldn't do a lot of things. Is there any way to setup a User to be able to edit files?
__________________
Comp. Specs:
Soyo Dragon Motherboard
2.8GHz Prescott overclocked 3.01GHz
1GB PC3200 DDR400 overclocked DDR430
ATI 9600 PRO 128MB
Seagate Barracuda 200GB 8MB Cache 7,200RPM
Windows XP Pro
Reply With Quote
  #2  
Old July 4th, 2003, 07:25 PM
twistedcranium twistedcranium is offline
CTH Subscriber
 
Join Date: May 2003
Posts: 1,133
NEVER run regularly as ROOT!!!

NEVER run regularly as ROOT!!!

NEVER run regularly as ROOT!!!


ok, now that I have stressed that....I don't care how much you think it 'sucks' to run as a regular user, use the root logon as little as possible.

Now...you ask, then how the heck can I edit files and configuration items?

Well for one, the GUI config applications in RedHat ask for the 'root' password when starting so that that app has permissions to setup whatever it needs and only what it needs to.

Then you have SU....this can be done from a terminal window and stands for SuperUser. You open a terminal window and type either "su" or "su -", and the system will prompt you for the root password.

su logs you into the terminal session as the root user in the current user's shell.....not completely root at that point since root's login scripts for the shell haven't been run. That is where su - comes in...it logs you in as root in the terminal session and runs the root's shell scripts.

All of these methods are used by even the most active system administrators...because the dangers of being root ALL THE TIME are very intense. You can really muck something up by the slip of a keystroke when doing things such as deleting files...and if you're not root, then no huge damage can be done.
Reply With Quote
  #3  
Old July 4th, 2003, 07:44 PM
R4NG3R's Avatar
R4NG3R R4NG3R is offline
Senior Member
 
Join Date: Feb 2003
Location: TEXAS
Age: 18
Posts: 717
yeah, i've heard of the

SU

command and i've done it, but when i do, it asks for the password and i enter it

then it brings me to the root thing like

[root@linuxcomputer]#

do i have to leave that terminal open to have SU rights?

also, can i edit text files throught the text editor and still have SU rights? or do i have to find away to edit them through the terminal?

because i was logged in as a user and i did the SU thing and i typed:

[root@linuxcompter]# vi /hlds/hlds_l/cstrike/server.cfg

it opened the VI Editor thing, but i couldn't edit it.
__________________
Comp. Specs:
Soyo Dragon Motherboard
2.8GHz Prescott overclocked 3.01GHz
1GB PC3200 DDR400 overclocked DDR430
ATI 9600 PRO 128MB
Seagate Barracuda 200GB 8MB Cache 7,200RPM
Windows XP Pro
Reply With Quote
  #4  
Old July 4th, 2003, 07:55 PM
twistedcranium twistedcranium is offline
CTH Subscriber
 
Join Date: May 2003
Posts: 1,133
Imagine that each terminal or application that you run as having been run as the user that you're logged in as.

So when you log in as 'user' and then open a terminal window, you're 'user' in that terminal window. Issuing the su command then switches you to 'root' in that terminal only.

You can run applications as other users and such so that a particular instance of that app has root priviledges but it requires some tweaking of the startup of that app.

I strongly suggest that you read the RedHat doc regarding the starting of applications via the GUI and command line and the interaction with super user and regular users. Study a bit on user rights as well. This is too big of an issue to cover in one thread....especially since it comprises a bunch of different but related linux topics.

As for editing that file in vi....you can't just type away in vi like you would in windows notepad....there are certian keys you must invoke before editing can occur. There are a TON of vi help pages available via google and even the man page as well. I'll give ya a hint though...to start editing a file...move the cursor to where you want to edit and hit 'a'. This will begin to allow you to 'append' after the cursor.

So hit those man pages and google links man!
Reply With Quote
  #5  
Old July 4th, 2003, 08:00 PM
R4NG3R's Avatar
R4NG3R R4NG3R is offline
Senior Member
 
Join Date: Feb 2003
Location: TEXAS
Age: 18
Posts: 717
lol, will do. thanks
__________________
Comp. Specs:
Soyo Dragon Motherboard
2.8GHz Prescott overclocked 3.01GHz
1GB PC3200 DDR400 overclocked DDR430
ATI 9600 PRO 128MB
Seagate Barracuda 200GB 8MB Cache 7,200RPM
Windows XP Pro
Reply With Quote
  #6  
Old July 4th, 2003, 08:51 PM
MishY's Avatar
MishY MishY is offline
Cyber Tech Help Administrator
 
Join Date: Sep 2000
O/S: Windows Vista 64-bit
Location: England
Age: 31
Posts: 8,562
Blog Entries: 1
If you run FTP and/or SSHd you shouldn't allow root logins either.
__________________
Searching the forums can help you to find your answers more quickly
Posting Tips & Support Forum Rules | Vivid Development | Get Firefox! | CTH News | Are you hungry ? | Registered Linux User #317145
Reply With Quote
Reply

Bookmarks

Topic Tools

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 On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:56 AM.

[ RSS ]