LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ok I'm using sodo (https://www.linuxquestions.org/questions/linux-newbie-8/ok-im-using-sodo-622258/)

cj4331 02-19-2008 10:04 AM

ok I'm using sodo
 
I'm setting up jason to be my administrator. I've done useradd jason and given him a password. I then went into /etc/sodoers and added the line
jason ALL=(ALL) ALL

Now logged in as Jason I issue the command
sodo service smb status
and I get
sodo: service: command not found

I used jason's password. I then tried the root password but it wouldn't take it. I want to use jason's password. My understanding is I can. How?

I'm using RedHat Linux.

cj4331 02-19-2008 10:05 AM

sorry I spelled sudo sodo but I was tying it into Linux correctly.

tredegar 02-19-2008 10:37 AM

Quote:

service: command not found
You do not have that command installed, or it is not in your PATH
Nothing is wrong with your passwords

cj4331 02-19-2008 10:50 AM

my path hu. Hadn't thought of that. Ok I typed echo $PATH and get nothing. I guess I don't have one set up for Jason. I get a path when I do that logged in as root. How do I set a path for jason?

tredegar 02-19-2008 12:35 PM

Quote:

How do I set a path for jason?
You use your favourite search engine ;)

Normally, when you add a new user, their PATH will be set up to be the default for non administrative users. This is usually determined by the entries in /etc/skel ("skel" = "skeleton" = bare-bones defaults), that you can customise there, and they will then be copied to all new users home directories when new users are created, to be executed when they login, so they get their environment set up properly. The environment is quite complex. To see yours, try the command env

If your default shell is bash once new users have a skeleton .bash_logout .bash_profile and .bashrc copied to their home directory, you (or they) can then customise them individually on a user by user basis.

I suspect that you have added the new user "jason" in an unusual way, because these defaults are usually set up "automagically" by the "create new user" scripts of your distro (which, by the way is not in your profile, please add it). You'll probably also have to make sure jason is a member of the correct groups.

Usually, adding a new user goes something like this (with KDE):
K-System-Users-Add new user-Defaults-Add a couple of extra group memberships, depending on your setup, Done.

Why are you making life so difficult for yourself?

cj4331 02-19-2008 12:56 PM

I added the user using useradd jason. I don't have any gui interface on this machine--if that's what kde is. How do I set a path command line style?

tredegar 02-19-2008 01:24 PM

Quote:

How do I set a path command line style?
Like this (for example)
Code:

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games
export $PATH

But this will be lost after a reboot.
To enable the path to be set at login, please see my previous posts.


All times are GMT -5. The time now is 11:19 PM.