LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 01-15-2010, 03:56 PM   #1
mecelec415
Member
 
Registered: Jan 2008
Location: Noble Park ,Victoria, Australia
Distribution: Mageia
Posts: 183
Blog Entries: 2

Rep: Reputation: 23
Dense User


Hello any chance of a quick run down on the correct way to read error logs in order to fault find mandriva and what info i should be posting when asking questions about how to get certain apps to work.

how can i read files like?
file:///var/log/faillog
i try to open them as me with kwrite and not see anything. How can I open them as root I cant seam to open kwite as root i can but it wont open files as root like earlier mandrivas did.
would it be ok to chown them to me ? would i have to chown them back to root after veiwing
 
Old 01-15-2010, 04:31 PM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Either sudo or su to root before attempting to open/view the files.
 
Old 01-16-2010, 04:21 AM   #3
ernie
Senior Member
 
Registered: Nov 2001
Location: Toledo, Ohio - USA
Distribution: Mageia 1
Posts: 1,079
Blog Entries: 4

Rep: Reputation: 70
Open a terminal window.

su to root, then enter the command
Code:
kwrite /var/log/faillog
If kwrite will not load the file when you use the su command, try using su -

HTH,
 
1 members found this post helpful.
Old 01-16-2010, 02:05 PM   #4
mecelec415
Member
 
Registered: Jan 2008
Location: Noble Park ,Victoria, Australia
Distribution: Mageia
Posts: 183

Original Poster
Blog Entries: 2

Rep: Reputation: 23
dash

su -
thanks for the dash ernie.
that made the difference
what excatly does it mean if you dont mind explaining (if your busy thanks for the tip and dont worry)
 
Old 01-18-2010, 07:10 AM   #5
ernie
Senior Member
 
Registered: Nov 2001
Location: Toledo, Ohio - USA
Distribution: Mageia 1
Posts: 1,079
Blog Entries: 4

Rep: Reputation: 70
Open a teminal window and run the following command to see the output below:

man su

This command opens the manual for the su command which answers your question better than I ever could
Quote:
SU(1) User Commands SU(1)

NAME
su - run a shell with substitute user and group IDs

SYNOPSIS
su [OPTION]... [-] [USER [ARG]...]

DESCRIPTION
Change the effective user id and group id to that of USER.

-, -l, --login
make the shell a login shell

-c, --command=COMMAND
pass a single COMMAND to the shell with -c

-f, --fast
pass -f to the shell (for csh or tcsh)

-m, --preserve-environment
do not reset environment variables

-p same as -m

-s, --shell=SHELL
run SHELL if /etc/shells allows it

--help display this help and exit

--version
output version information and exit

A mere - implies -l. If USER not given, assume root.

Report su bugs to bug-coreutils@gnu.org GNU coreutils home page:
<http://www.gnu.org/software/coreutils/> General help using GNU soft‐
ware: <http://www.gnu.org/gethelp/>

AUTHOR
Written by David MacKenzie.

COPYRIGHT
Copyright © 2009 Free Software Foundation, Inc. License GPLv3+: GNU
GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

SEE ALSO
The full documentation for su is maintained as a Texinfo manual. If
the info and su programs are properly installed at your site, the com‐
mand

info su

should give you access to the complete manual.

GNU coreutils 7.5 October 2009 SU(1)
Putting it in other terms, running the su command with no arguments (no user name), tells su to open a shell with the root user and group ID. Adding the dash (su -) tells su to run a log-in shell with the root user and group ID.

You can use the man command with most Linux commands to get a manual.

HTH,
 
Old 01-23-2010, 09:24 AM   #6
hal_2001
LQ Newbie
 
Registered: Oct 2003
Location: UK
Distribution: Mandriva, Red Hat, Fedora Core, MontaVista
Posts: 23

Rep: Reputation: 16
su on its own uses the current user's environment eg. $PATH etc. You will notice that the current directory did not change when this command was actioned. If the current user does not have permission for some things then using su may not give the superuser root permission either because root specific login scripts would not have been run.

su - creates a new shell for the superuser root account and runs all root login scripts. The current directory changes to the home directory of root. If in doubt, use su - as this will always be the true root account.
 
1 members found this post helpful.
  


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
unchecked link between pc user and sudo user on Mint5 how do I get it back,stop laugh Fred Caro Linux - Newbie 2 04-22-2009 08:36 PM
how to create sftp user only in red hat 4 not ftp user ..only sftp user princeu28 Linux - Newbie 1 10-14-2008 08:10 AM
multicast Routing - PIM Dense warmongr Linux - Networking 0 03-10-2006 01:19 PM
C program to see user log on in system and print user with real user name also naveen245 Programming 2 12-21-2005 12:53 AM
grant user access to /fat-c & copying users' preferences to another user n0x Linux - Newbie 1 07-04-2004 12:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

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