LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 09-20-2018, 05:03 AM   #1
radeon45
LQ Newbie
 
Registered: Sep 2018
Posts: 4

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


Hi,

I am a new user for the Linux SUSE operating system. And now I'm having a problem on the server with the SUSE Enterprise Server 11 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:

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


But when I login using the user as root, why when I type "id" appears like this:
serversuse: ~> 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 09-20-2018, 06:03 AM   #2
lougavulin
Member
 
Registered: Jul 2018
Distribution: Slackware,x86_64,current
Posts: 229

Rep: Reputation: 77
So you have 2 users root and systemadm23 with the same UID ?

That seems extremely weird and inappropriate.
 
Old 09-20-2018, 06:45 AM   #3
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: Debian, Crux, LFS, AntiX
Posts: 2,346
Blog Entries: 5

Rep: Reputation: 1038Reputation: 1038Reputation: 1038Reputation: 1038Reputation: 1038Reputation: 1038Reputation: 1038Reputation: 1038
The proper way to deal with this sort of problem is to create a normal user with his own UID and then use sudo to give him full rights without needing to use a password. Two users with one UID (especially if it's UID 0) is a recipe for trouble.
 
Old 09-20-2018, 08:24 AM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 / Slackware 14.2 current / Manjaro / Parrot
Posts: 7,144

Rep: Reputation: 1433Reputation: 1433Reputation: 1433Reputation: 1433Reputation: 1433Reputation: 1433Reputation: 1433Reputation: 1433Reputation: 1433Reputation: 1433
having the same UID for more than one user on the same system is not what is called normal operating procedure (NOP). as stated it is easier to give

Code:
## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
in /etc/sudoers file, one can use %sudo group as well.
 
Old 09-20-2018, 10:37 AM   #5
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: Debian, Crux, LFS, AntiX
Posts: 2,346
Blog Entries: 5

Rep: Reputation: 1038Reputation: 1038Reputation: 1038Reputation: 1038Reputation: 1038Reputation: 1038Reputation: 1038Reputation: 1038
Doing it that way through a group works well on a home system. But on an office server, you might want to have members of the wheel/sudo group with enhanced but still restricted rights: for example, the right to shut down or reboot the system but not to do updates. That's why I think it would be better to do it through an individual user as suggested by the OP. Only via sudoers and not by conflating two users with a single UID!
 
Old 09-20-2018, 11:28 AM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 / Slackware 14.2 current / Manjaro / Parrot
Posts: 7,144

Rep: Reputation: 1433Reputation: 1433Reputation: 1433Reputation: 1433Reputation: 1433Reputation: 1433Reputation: 1433Reputation: 1433Reputation: 1433Reputation: 1433
sorry, I do agree, server users with elevated / restricted root rights/privileges. brain slip on the server part.

a little how to
https://www.garron.me/en/linux/visud...lt-editor.html
 
Old 09-20-2018, 11:23 PM   #7
radeon45
LQ Newbie
 
Registered: Sep 2018
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by lougavulin View Post
So you have 2 users root and systemadm23 with the same UID ?

That seems extremely weird and inappropriate.
lougavulin,

Yes, I have 2 user with UID=0. Because it's needed, user systemadm23 is use for specifically one application (requirement need user equivalent with root).
 
Old 09-20-2018, 11:33 PM   #8
radeon45
LQ Newbie
 
Registered: Sep 2018
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thank you for your attention all of you,

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. So, it can't via sudoers.

Any other solution?
 
Old 09-21-2018, 07:35 AM   #9
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: MID-SOUTH USA
Distribution: Slackware 14.2 / Slackware 14.2 current / Manjaro / Parrot
Posts: 7,144

Rep: Reputation: 1433Reputation: 1433Reputation: 1433Reputation: 1433Reputation: 1433Reputation: 1433Reputation: 1433Reputation: 1433Reputation: 1433Reputation: 1433
yes you can. you can customize sudoers file
read over this
https://www.tecmint.com/sudoers-conf...sudo-in-linux/
and this
https://www.tecmint.com/su-vs-sudo-a...sudo-in-linux/

you can specify within sudoers file, as well using #includedir /etc/sudoers.d

Last edited by BW-userx; 09-21-2018 at 07:37 AM.
 
Old 09-25-2018, 11:16 PM   #10
radeon45
LQ Newbie
 
Registered: Sep 2018
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by BW-userx View Post
yes you can. you can customize sudoers file
read over this
https://www.tecmint.com/sudoers-conf...sudo-in-linux/
and this
https://www.tecmint.com/su-vs-sudo-a...sudo-in-linux/

you can specify within sudoers file, as well using #includedir /etc/sudoers.d
BW-userx,

Thanks for the link, finally the uid not changing again. The article of the link help me for the problem, and I just change the configuration on the application too that can make the application can run the systems using sudoers's user.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Change uid from user who had uid=0 (but not is root) rockyx Linux - General 10 04-27-2017 02:49 PM
does anybody knows what this means? ptymonitor: pam_unix(login:session): session opened for user root by (uid=0) osalas Red Hat 3 08-15-2016 10:01 PM
[SOLVED] Root user uid got changed 0 to 1 rajsridhar Ubuntu 4 02-12-2015 11:35 AM
startx doesn't work everytime as non root user kuroc Slackware 2 01-28-2012 10:05 AM
(pam_unix) session opened for user root by (uid=0) frenchn00b Debian 1 01-01-2008 08:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 06:13 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration