LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   Everytime login subject in the UID name changes sometimes root sometimes the user name x (https://www.linuxquestions.org/questions/suse-opensuse-60/everytime-login-subject-in-the-uid-name-changes-sometimes-root-sometimes-the-user-name-x-4175638785/)

radeon45 09-20-2018 04:03 AM

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.

lougavulin 09-20-2018 05:03 AM

So you have 2 users root and systemadm23 with the same UID ?

That seems extremely weird and inappropriate.

hazel 09-20-2018 05:45 AM

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.

BW-userx 09-20-2018 07:24 AM

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.

hazel 09-20-2018 09:37 AM

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!

BW-userx 09-20-2018 10:28 AM

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

radeon45 09-20-2018 10:23 PM

Quote:

Originally Posted by lougavulin (Post 5905661)
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).

radeon45 09-20-2018 10:33 PM

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?

BW-userx 09-21-2018 06:35 AM

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

radeon45 09-25-2018 10:16 PM

Quote:

Originally Posted by BW-userx (Post 5906125)
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.
:thumbsup: :)


All times are GMT -5. The time now is 01:23 PM.