LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 12-06-2018, 03:35 AM   #1
radeon45
LQ Newbie
 
Registered: Sep 2018
Posts: 6

Rep: Reputation: Disabled
Everytime login subject in the UID name changes sometimes root sometimes the user name x on CentOS


Hi,

I am a new user for the Linux CentOS operating system. And now I'm having a problem on the server with the CentOS release 6.7 Linux OS.
I intend to add a new user with the name systemadm23, and I want to make that user have privileges at the root level so I made it in the etc / passwd like this:

servercentos: ~> cat / etc / passwd | grep systemadm23
systemadm23: x: 0: 0: Emergency User, Security Management: / home / systemadm23: / bin / sh
servercentos: ~>


But when I login using the user as root, why when I type "id" appears like this:
servercentos: ~> id
uid = 0 (systemadm23) gid = 0 (root) groups = 0 (root)


it should be like this "uid = 0 (root) gid = 0 (root) groups = 0 (root)" ??

Please help, because when I want to login using root, uid sometimes changes.

note: please forgive me if there is a way of posting from me that is not appropriate
 
Old 12-06-2018, 03:40 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,461

Rep: Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552Reputation: 1552
You are going about this totally the wrong way. UID must be unique, you can't just give another user the UID of 0 and expect it to work.

You need to create your new user as a normal user and then read up on sudo / [/b]sudoers[/b] to allow the user to execute commands at an elevated privilege.

Alternatively you can add the user to the group wheel, again, go read up on sudo/sudoers and things may become clearer.
 
Old 12-06-2018, 05:13 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
radeon45, what is the purpose of this?
there is most probably a better way to achieve what you want.
 
Old 12-06-2018, 09:57 PM   #4
radeon45
LQ Newbie
 
Registered: Sep 2018
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thank you for your respon.

@TenTenths
Yes, I know. It's not properly way. But it's needed to run specifically application. User systemadm23 will be use for administrator user account of application, and the system of the application will be using it.
In operating systems Linux Suse, I face a similar case too. But, it's have solved after I custom on the sudoers file like what you said.
And I have try to do the same in this Linux CentOS but it's make the application failed to integrate a service to the target server (Linux CentOS).

Any other solution?

@ondoho,
it's needed to run specifically application. User systemadm23 will be use for administrator user account of application, and the system of the application will be using it.
 
Old 12-07-2018, 01:56 AM   #5
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by radeon45 View Post
it's needed to run specifically application. User systemadm23 will be use for administrator user account of application, and the system of the application will be using it.
"specific application" is not an explanation of what you want to achieve.

but i guess tentenths is right, you need to set up sudo instead of creating a new root user.
 
  


Reply

Tags
centos6


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Everytime login subject in the UID name changes sometimes root sometimes the user name x radeon45 SUSE / openSUSE 9 09-25-2018 10:16 PM
Change uid from user who had uid=0 (but not is root) rockyx Linux - General 10 04-27-2017 01:49 PM
Changing the UID of a Physical Volume to a specific UID jambraun Linux - Newbie 2 02-09-2006 02:34 PM
FREEBSD5.3 platform: PHP setcookie() successful, but $uid = $_COOKIE['uid']; fail tclwp Programming 1 03-30-2005 08:05 PM
alsamixer changes emu10k1 levels everytime xmms changes songs sulzla Linux - Software 0 06-29-2003 11:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

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

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