We help IT Professionals succeed at work.

COnfiguring to allow su to root and users to sudo

gordonmann
gordonmann asked
on
m setting up an IBM system and need to allow my users to su to rrot (if they know the password) and also to allow them to sudo to root as well.
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2007

Commented:
Hi,

Here a link on how to configure sudo:

http://www.unixtutorial.org/2008/01/sudo-tutorial/

If users run the command

su -

What error message they get?

Author

Commented:
Cannot su to root Authentication is denied
CERTIFIED EXPERT
Top Expert 2007

Commented:

Author

Commented:
Tried that chuser su=true username and received "cannot execute".  I was logged on as root.
CERTIFIED EXPERT
Top Expert 2007

Commented:
Can you see what permissions and who own chuser?

Author

Commented:
How do I tell

Author

Commented:
This is curious here is what I am getting when I log on as root. And try the "locate" command.

/etc/profile[73]: /usr/local/bin/byram_login.sh:  not found.
/etc/profile[74]: test: 0403-004 Specify a parameter with this command.
/etc/profile[89]: /usr/local/bin/ivr_flg.sh:  not found.
mkdir: cannot access directory /var/byrams/output/tmp.
/var/byrams/output/tmp: No such file or directory
[root@stage01:/] locate chuser
ksh: locate:  not found
CERTIFIED EXPERT
Top Expert 2007

Commented:
Ok,

run

ls -l `which chuser`

and post output

Author

Commented:
Tried 2 users.   Also, I added /usr/bin to root's path and now the command works.
I think the environment profiels are messed up.


[root@stage01:/] ls -l root
root not found
[root@stage01:/] ls -l gmann
gmann not found
[root@stage01:/]
CERTIFIED EXPERT
Top Expert 2007
Commented:
normally the root home dir is /

for users you may use

finger username

PATH is normally set in /.profile for root if using sh / ksh

If using csh, then path in /.login

Author

Commented:
Login name: root
Directory: /                            Shell: /usr/bin/ksh
On since Jan 24 15:30:26 on pts/0
    from 10.15.61.89
No Plan.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.