LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I don't want to work as "root", but... (https://www.linuxquestions.org/questions/linux-newbie-8/i-dont-want-to-work-as-root-but-31458/)

akshunj 09-29-2002 06:08 PM

I don't want to work as "root", but...
 
I've searched the forums, and perhaps this is far to basic a question...

I am up and running on the newest Slackware. In keeping with the recommendations of the available documentation, as well as the linux gurus who regularly post here, I added a regular "user" and logged in as such. That's where the fun ended. Every single command I typed gave me a response of "command or file not found" or something. Even when I switched back to "root" with the "su" command, I still could not do things like startx. I had to reboot and log back in as root to get going again. I am wondering if this has something to do with permissions or groups or something. I was almost embarrassed to ask this question since it seemed rather basic, and I feel I simply overlooked something. Thanks in advance for the help!

--Akshun J

trickykid 09-29-2002 06:25 PM

Well first off, when you first install Slack, it doesn't configure X for you, so the first thing to do as root would be to configure X by typing xf86config.
Then, when your su'ing as root, usually just a simple:
Code:

{user@localhost} su
password:  root's password
{root@localhost ~}#

isn't going to give you its full path to look or execute from.

Though if you give a su - or su - root will give you root's full path and should be able to give any command without the full path to it.

You may want to look into sudo, so you can setup special permissions for your regular user's accounts so you don't have to su all the time.

Hope this helps.

adam_boz 09-29-2002 06:52 PM

look at /rot/.bash_profile , then at /home/<user>/.bash_profile The "PATH=" is the setting wich tells bash where to look for programs. You can set this for the whole system with the file /etc/profile. If you change one of these files while in a shell, type "source .bash_profile" (or /etc/profile) to make the changes active

akshunj 09-29-2002 09:42 PM

Trickykid, I have actually already installed X. Although I'm having some sound issues, I think I can sort them out. I actually posted my original message from Mozilla within Gnome. However, when I log in as a normal user , I can't do a thing. Thanks for the "su" command line clarifications, though.

Adam_boz, I will check the files you suggested. I'm not sure I follow what you want me to do with them. But, I'l check them out and post what I see.

Thanks a lot for your help, guys!!!

--Akshun J

neo77777 09-29-2002 10:01 PM

It sounds strange, how did you create user, at least you should be ab le to startx as a regular user, use adduser command to setup a user account, plus check the PATH env variable for a newly creatred user.
echo $PATH

akshunj 09-29-2002 10:11 PM

I'll give it a whirl.... Update in 5 minutes...

--Akshun J

akshunj 09-29-2002 10:28 PM

Well, the path for my "user" persona was quite a bit more limited than "root". Perhaps I'm not asking the correct question.

How can I add a user that is able to function on basic level within Linux. Is adding this user to a particular group the answer? Or perhaps changing $PATH variables (which I do not know how to edit at this point)? I was playing around with Kuser in KDE, and I added my "user" to the "adm" group, but that did not seem to help, even though the prompt referred to him by username as well as root...

--Akshun J

neo77777 09-29-2002 10:39 PM

Well, if you want to fiddle with Kuser instead of straight forward adduser command be my guest, the $PATH can be defined in a couple of places, your best bet would be in .bash_profile file in the user home directory
PATH=$PATH:/usr/bin/:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin
export PATH
Note: I included some directories which are available to root to execute from without specifying the full path, these are /sbin, /usr/sbin, /usr/local/sbin(optional)

akshunj 09-29-2002 11:21 PM

Neo77777, you rock! I have successfully navigated into KDE with my regular user persona. Now, if I can just get this sound issue nailed down, perhaps I will get some sleep tonight! Thanks to everyone...

--Akshun J

neo77777 09-29-2002 11:24 PM

No problem, it takes some time to get fully functional "non plug and pray" Operating System such as Slackware, the thing there another here, bits by bits and soon you realize how far you've gone.
Good luck.
Neo.


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