MandrivaThis Forum is for the discussion of Mandriva (Mandrake) Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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)
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/>
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.
Distribution: Mandriva, Red Hat, Fedora Core, MontaVista
Posts: 23
Rep:
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.