LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Accessing problem (https://www.linuxquestions.org/questions/fedora-35/accessing-problem-706564/)

shariefbe 02-22-2009 02:40 AM

Accessing problem
 
Hello,
i am using fedora 8.0.....in my fedora i am having one user..thats my name..but when i enter in to my login no commands are working properly...but when i login as root all are working fine......can anyone tell me why it happens...what to do for that?

repo 02-22-2009 02:44 AM

which commands are you using?
errormessages?

For certain commands, you need to be root in order to execute them.
you can use
Code:

su
to become root, or if installed and configured
Code:

sudo command

shariefbe 02-22-2009 02:51 AM

no its not working when i use sudo too....what to do?whats the problem?i cant diagonise it....

repo 02-22-2009 02:54 AM

what is the command you are trying to use?
what doesn't work.
what is the errormessage?
please give more info.

shariefbe 02-22-2009 03:54 AM

if i type any command its coming as "command not found".....

repo 02-22-2009 03:56 AM

which command?
is your path correctly set?
Code:

echo $PATH
what happens if you type
Code:

/bin/df

shariefbe 02-22-2009 10:12 PM

This is the output of both commands

[sharief@localhost Desktop]$ echo $PATH
/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/sharief/bin



[sharief@localhost Desktop]$ /bin/df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda3 36927788 8522296 26499380 25% /
tmpfs 1032928 12 1032916 1% /dev/shm
[sharief@localhost Desktop]$

PTrenholme 02-23-2009 12:09 AM

Commands that are reserved for "root" are usually in directories called "sbin" instead of "bin," and none of those directories are in your PATH so, by default, you cannot access them as yourself. (Remember, Linux is based on UNIX which is a multi-user system desigend to prevent "common" users from messing with the parts of the system that effect every user. Contrast that to the Windows system which is based on a single-user, hobbyist, system with no system security.)

From your post it's clear that some commands are working for you. So, what are you trying to do that's not working? And, did you get any output from the sudo command? (Do a su -c 'cat /etc/sudoers' to see how to configure that file so you can use the sudo command.)

lazlow 02-23-2009 12:36 AM

If it was not made clear before, su gives you root power with the user's path. su - (su space dash) gives you root power and root's path. A lot of commands need both root power and root's path. For the most part I just skip su and pretty much use su - exclusively.

repo 02-23-2009 02:20 AM

Quote:

This is the output of both commands

[sharief@localhost Desktop]$ echo $PATH
/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/lib/ccache:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/sharief/bin


[sharief@localhost Desktop]$ /bin/df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda3 36927788 8522296 26499380 25% /
tmpfs 1032928 12 1032916 1% /dev/shm
[sharief@localhost Desktop]$
So what happens if you type df?

shariefbe 02-23-2009 02:55 AM

The output of df is as follows

[sharief@localhost ~]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda3 36927788 8524532 26497144 25% /
tmpfs 1032928 12 1032916 1% /dev/shm
[sharief@localhost ~]$


repo 02-23-2009 02:59 AM

and if you type this as user?
Because that is the problem, no commands work as user

shariefbe 02-23-2009 03:00 AM

This is the output of sudo is


[sharief@localhost ~]$ sudo insmod atl2.ko
Password:
sharief is not in the sudoers file. This incident will be reported.

repo 02-23-2009 03:06 AM

then you need to add sharief to the sudo users

take a look at
http://www.mjmwired.net/resources/mj...-fc6.html#sudo

shariefbe 02-23-2009 03:18 AM

yes i added accourding to that steps...but i am getting

[sharief@localhost /]$ sudo insmod atl2.ko
sudo: insmod: command not found
[sharief@localhost /]$


This is another problem.....am getting this error message when i type a command in normal user..i dont know why its happening...


All times are GMT -5. The time now is 03:05 PM.