LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-19-2008, 10:04 AM   #1
cj4331
Member
 
Registered: Feb 2008
Posts: 30

Rep: Reputation: 15
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.
 
Old 02-19-2008, 10:05 AM   #2
cj4331
Member
 
Registered: Feb 2008
Posts: 30

Original Poster
Rep: Reputation: 15
sorry I spelled sudo sodo but I was tying it into Linux correctly.
 
Old 02-19-2008, 10:37 AM   #3
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
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
 
Old 02-19-2008, 10:50 AM   #4
cj4331
Member
 
Registered: Feb 2008
Posts: 30

Original Poster
Rep: Reputation: 15
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?
 
Old 02-19-2008, 12:35 PM   #5
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
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?
 
Old 02-19-2008, 12:56 PM   #6
cj4331
Member
 
Registered: Feb 2008
Posts: 30

Original Poster
Rep: Reputation: 15
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?
 
Old 02-19-2008, 01:24 PM   #7
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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




All times are GMT -5. The time now is 12:34 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration