LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-30-2004, 06:25 AM   #1
xanas3712
Member
 
Registered: Apr 2004
Distribution: Slackware/Mandrake/Debian (sarge)
Posts: 266

Rep: Reputation: 30
Simple Question - how to modify file attributes?


I have no idea how to do this, and apparently it's supposed to be so easy I can't find the answer anywhere easily.. what command do I type, or whatever to take off the readonly attribute on a file.. I want to edit my XF86Config-4 file so that I can get dual monitor support working, and besides I need to know this anyway right?
 
Old 04-30-2004, 06:35 AM   #2
ac1980
Member
 
Registered: Aug 2003
Location: Trento, Italy
Distribution: Debian testing
Posts: 394

Rep: Reputation: 30
use chmod attributes filelist
for info read the manpage ('info chmod' or 'man chmod').
You must be either file owner or root (which in your case are the same) to be allowed to do this.
Note that on non-native fs (like vfat) most attributes can't be changed on a per-file basis, all the files have the same owner/permissions determined at mount time.

PS: note that you should not make files in /etc writeable to normal user, since you (or an application) may damage the system. Instead, use 'su' to become root before launching the editor

Last edited by ac1980; 04-30-2004 at 06:38 AM.
 
Old 04-30-2004, 06:37 AM   #3
xanas3712
Member
 
Registered: Apr 2004
Distribution: Slackware/Mandrake/Debian (sarge)
Posts: 266

Original Poster
Rep: Reputation: 30
right.. um.. just noticed something.. I can't log in as root to modify it.. which is incredibly lame..

mandrake gives me this menu when I logout that won't let me select anything but the one user I created .. kinda stupid if you ask me and I remember it didn't use to do that (back when I tried mandrake a couple years ago now..)

Any idea how I can even log in as root...?
 
Old 04-30-2004, 06:38 AM   #4
verstapp
Member
 
Registered: Feb 2004
Location: canberra australia
Distribution: Suse 9.0
Posts: 44

Rep: Reputation: 15
In file manager (Konqueror in KDE) right-click on the file, select the properties menu item, select the permissions tab, and click in boxes to switch permissions on/off, click OK to set them.
Of course there is a command-line prog that this is a front end for - type man chmod at the command line.
 
Old 04-30-2004, 06:39 AM   #5
xanas3712
Member
 
Registered: Apr 2004
Distribution: Slackware/Mandrake/Debian (sarge)
Posts: 266

Original Poster
Rep: Reputation: 30
yeah the problem was I'm not logged in as root.. but I can't figure out how to login as root on mandrake 10...
 
Old 04-30-2004, 06:46 AM   #6
bigjohn
Senior Member
 
Registered: Jun 2002
Location: UK .
Distribution: *buntu (usually Kubuntu)
Posts: 2,682
Blog Entries: 9

Rep: Reputation: 45
Not to up with technospeak, so I don't follow what you mean by attributes!

Anyway, to alter the XF86Config-4, you can either log in as root (as in a graphic login), and then just use konqueror to search for it (probably /etc/X11/XF86Config-4) or you can do the mod with an editor.

For example, using VI (which is installed as default ed with mandrake), you'd open a terminal/konsole, the "SU" and root password so you are then in as root, you'd then type
Code:
vi /etc/X11/XF86Config-4
That opens the file in VI, you then have to navigate it with keyboard arrows. To actually do the changes move cursor to wherever, then hit the "insert" key, enter/delete/modify so the changes are done, to save the changes hit Esc key, then type :wq enter (note you must type in the : colon). If you aren't sure of what changes you want to make, you can just do :q to quit (again, the colon).

You should have, or be able to find some documentation for using VI (maybe in /usr/share/doc). But which editor you try, if they are "proper" editor's the you'll have to find the instructions.

Erm if you've got kde installed, you can do the root login (graphical), then just got to editors and then select kwrite, that is the kde editor, and you can use it like a word procesor.

that's what I do

regards

John
 
Old 04-30-2004, 06:47 AM   #7
ac1980
Member
 
Registered: Aug 2003
Location: Trento, Italy
Distribution: Debian testing
Posts: 394

Rep: Reputation: 30
I don't use mdk, however you can try these:
1. on login page there's a system menu that should contain something like 'prefereces' or 'config'
2. maybe after logging in as user, in the start menu/system there's a gdm (or xdm) config tool

Look there if there's a 'don't allow root login' checkbox
However you should better only run only needed applications as root, using a "run as root" command that probably is in atart/system menu
 
Old 04-30-2004, 07:06 AM   #8
xanas3712
Member
 
Registered: Apr 2004
Distribution: Slackware/Mandrake/Debian (sarge)
Posts: 266

Original Poster
Rep: Reputation: 30
I've figured out how to do this, (get root permissions and log in as root, etc.).. So thanks, though I'm still having trouble with what I'm actually trying to do, but I had another thread for that so I'll just use it..
 
Old 04-30-2004, 08:04 AM   #9
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
http://www.linuxquestions.org/questi...hreadid=164314

Follow that short thread for a howto get root login for KDM in KDE 3.2 on MDK 10.

Or just "su" to it in a terminal...
 
Old 04-30-2004, 08:07 AM   #10
xanas3712
Member
 
Registered: Apr 2004
Distribution: Slackware/Mandrake/Debian (sarge)
Posts: 266

Original Poster
Rep: Reputation: 30
i just right clicked the terminal window and used the root terminal to what was that command again..whatever command it is that allows you to change the runlevel.. i just changed it to 3 which disabled the gui.. and was able to login root from there and just restart x with startx command.

Heh.. I figured that out by myself.. of course nothing else so far I have
 
Old 04-30-2004, 08:15 AM   #11
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
That's another way. You're thinking about
Code:
telinit
To do simple things like change your runlevel, make your like easier and just open a small terminal window and "su" into root. Change what you need with chmod and close the window when you're done.

There's also a way to log a session within a session too (like vmware), but I forget what that was...
 
Old 04-30-2004, 03:02 PM   #12
xanas3712
Member
 
Registered: Apr 2004
Distribution: Slackware/Mandrake/Debian (sarge)
Posts: 266

Original Poster
Rep: Reputation: 30
su = switch user eh? I just figured that out.. it's nice to have a brain after sleeping.. lol.
 
Old 04-30-2004, 08:03 PM   #13
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
After doing things this way, I can't feel safe on a Redmond machine any more. Default admin accounts are just too scary.
 
  


Reply


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
Changing File Attributes terdbird Slackware 6 04-23-2005 04:39 AM
uploaded file on vsftpd has wrong file attributes rune.kg Linux - Newbie 2 03-06-2004 10:23 AM
file attributes binky22 Linux - Newbie 2 09-26-2003 05:17 PM
modify file access & modify timestamps i2itstud Linux - General 1 05-20-2003 04:34 AM
Changing file attributes from C sourceman Linux - General 3 04-23-2002 08:37 PM


All times are GMT -5. The time now is 11:55 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration