LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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, 04:03 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


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, 05:03 AM   #2
lougavulin
Member
 
Registered: Jul 2018
Distribution: Slackware,x86_64,current
Posts: 279

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

That seems extremely weird and inappropriate.
 
Old 09-20-2018, 05:45 AM   #3
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,608
Blog Entries: 19

Rep: Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458
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, 07:24 AM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
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, 09:37 AM   #5
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,608
Blog Entries: 19

Rep: Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458Reputation: 4458
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, 10:28 AM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
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, 10:23 PM   #7
radeon45
LQ Newbie
 
Registered: Sep 2018
Posts: 6

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, 10:33 PM   #8
radeon45
LQ Newbie
 
Registered: Sep 2018
Posts: 6

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, 06:35 AM   #9
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
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 06:37 AM.
 
Old 09-25-2018, 10:16 PM   #10
radeon45
LQ Newbie
 
Registered: Sep 2018
Posts: 6

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



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 01: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 09:01 PM
[SOLVED] Root user uid got changed 0 to 1 rajsridhar Ubuntu 4 02-12-2015 10:35 AM
startx doesn't work everytime as non root user kuroc Slackware 2 01-28-2012 09:05 AM
(pam_unix) session opened for user root by (uid=0) frenchn00b Debian 1 01-01-2008 07:18 AM

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

All times are GMT -5. The time now is 01: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