LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-07-2008, 03:38 PM   #1
vvv123
LQ Newbie
 
Registered: Nov 2008
Posts: 9

Rep: Reputation: 0
having issue with super user for Red Hat linux server 5


hi to all

A quick question.

I installed a new red hat linuxx server 5

How can add a super user on it?



I created user X. I added X in a group root.

I updated the /etc/sudoers as X ALL=(ALL) ALL



Still, user X doesn’t working as root user.

Do I need to restart the my server ?

Do you have any idea? Please.


Thanks
Vi
 
Old 11-07-2008, 03:47 PM   #2
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
useradd -m -g 0 -u 0 X
passwd X

no sudo setup, if the user is root or root rights.
 
Old 11-07-2008, 04:05 PM   #3
vvv123
LQ Newbie
 
Registered: Nov 2008
Posts: 9

Original Poster
Rep: Reputation: 0
thanks robertjinx

but how can I add different users with same user ID.
What I mean already root user is having 0. So, how can I assign same to other guy ????

plz help me out.
 
Old 11-07-2008, 04:09 PM   #4
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
Yes, useradd -u 0 means userid "0" or "root"
useradd -g 0 mean groupid "0" or "root"

you can also add multiple groups to a user like this:

usermod -G mail username (this is only an example)
 
Old 11-07-2008, 04:35 PM   #5
vvv123
LQ Newbie
 
Registered: Nov 2008
Posts: 9

Original Poster
Rep: Reputation: 0
thanks robertjinx

I havent tried it. coz I am away from the server.
Anyway thanks a lot for your immediate reply..
 
Old 11-07-2008, 05:05 PM   #6
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Quote:
Originally Posted by vvv123 View Post
thanks robertjinx

but how can I add different users with same user ID.
What I mean already root user is having 0. So, how can I assign same to other guy ????

plz help me out.

If you're smart, you won't. Root is root, and no-one else should be root.
 
Old 11-07-2008, 08:30 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by robertjinx View Post
useradd -m -g 0 -u 0 X
passwd X

no sudo setup, if the user is root or root rights.
Sorry mate, but I feel you need to give this kind
of advice out with a hefty warning; this is VERY
BAD PRACTICE AND SHOULD BE AVOIDED
AT ALL COST





Cheers,
Tink
 
Old 11-08-2008, 01:23 AM   #8
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
Man, this is not my issue, I just answered the guy what he needs, there is no good or bad advice.

Also root or normal user is no issue nether like security if you make sure you have a proper password, I mean complex and some good pam settings and so on.

You can always be hacked doesnt matter what user we talk about...
 
Old 11-08-2008, 11:40 AM   #9
vvv123
LQ Newbie
 
Registered: Nov 2008
Posts: 9

Original Poster
Rep: Reputation: 0
hi Tink

Hi tink,

Actually i havent tried robertjinx solution.
If you have any effiecent solution then that, please let me know.

anyway thanks alot for you comment.

Cheers mate,
Vi.
 
Old 11-08-2008, 11:42 AM   #10
vvv123
LQ Newbie
 
Registered: Nov 2008
Posts: 9

Original Poster
Rep: Reputation: 0
hi qyakeboy

hi qyakeboy,

That is my requirement, I cant do anything.
It always depends on boss reks, not on how samrt I is.

Anyway thanks alot for your comment dude.


Vi.
 
Old 11-08-2008, 11:45 AM   #11
vvv123
LQ Newbie
 
Registered: Nov 2008
Posts: 9

Original Poster
Rep: Reputation: 0
robertjinx

roberjinx,

If I try your command, do I get any problem if I log as root rather then X.

What exactly tink means.

As you know I am not a expert user of unix/Linux.

Thanks,
Vi
 
Old 11-08-2008, 12:01 PM   #12
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by robertjinx View Post
Man, this is not my issue, I just answered the guy what he needs, there is no good or bad advice.
I've had quite a few discussions of that type here; and
it's sad to see how many people think like you. The difference
between knowledge and wisdom, I guess. And of course a
refusal to accept responsibility.

Quote:
Originally Posted by robertjinx View Post
Also root or normal user is no issue nether like security if you make sure you have a proper password, I mean complex and some good pam settings and so on.

You can always be hacked doesnt matter what user we talk about...
Pretty lame excuse(s). The fact remains standing that one
shouldn't be running as root for a variety of reasons:
foremost the possibility to be had by an exploit via modern
commodities like web-browsers if they happen to be vulnerable.
Of course, if you followed security lists you'd be aware of
just how many exploits are being discovered, and that they're
commonly of far lesser risk if they're executed by a non-
privileged user. A "proper password" won't help you if there's
a hole in your software, because you're logged in and using it.



Cheers,
Tink
 
Old 11-08-2008, 12:08 PM   #13
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally Posted by vvv123 View Post
Hi tink,

Actually i havent tried robertjinx solution.
If you have any effiecent solution then that, please let me know.

anyway thanks alot for you comment.

Cheers mate,
Vi.

As I said in my post in the dupe on newbie: what are
you trying to achieve with this? His solution is dangerous,
and against any best practice in IT. There's a reason that
Linux (Unix) has that kind of set-up, and that the default
in Linux is NOT to be working with admin privileges. Using
non-privileged user accounts protects you from your own
mistakes, and from exploits that are potentially not known
to you yet.



Cheers,
Tink
 
Old 11-08-2008, 12:10 PM   #14
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
@vvv123: Pick up (from the bookstore or library) a relatively recent book on Linux for beginners. It would be best to get one that focuses on the distro you're using.

My guess is your boss is giving you bad advice. Learn to administer the system and implement solutions based on his needs. (And if he continues to micromanage the exact way things get implemented, maybe it would be time to question whether this is a good employment situation.)

All that said, the short answer is: su to root when needed, or utilize sudo.

Time to go get that book...
 
Old 11-08-2008, 12:16 PM   #15
vvv123
LQ Newbie
 
Registered: Nov 2008
Posts: 9

Original Poster
Rep: Reputation: 0
anomie

anomie,
thanks for your adivice.
but I a cant say no to my boss.
i just got to do what he said.
so, no other choice.
Thanks.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in creating super user account in red hat 5 vvv123 Linux - Newbie 2 11-07-2008 08:28 PM
Should I use desktop Red Hat Linux or Server Red hat linux? niner710 Linux - Newbie 3 04-15-2008 10:42 PM
How do I set up a new user so that they can see a folder on a Red Hat server? isara Red Hat 3 11-06-2006 12:39 AM
2.4 kernel (Red hat linux) Memory issue nmkarvekar Linux - Kernel 1 05-12-2006 05:55 AM
User password change for Red Hat Radius Server pld7 Linux - Security 1 08-17-2004 04:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:42 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
Open Source Consulting | Domain Registration