Why Default user is not created in CentOS7

General support questions
Post Reply
vyshnav
Posts: 60
Joined: 2017/09/12 03:37:54

Why Default user is not created in CentOS7

Post by vyshnav » 2017/11/16 05:52:36

Hi,
Why the default user is not created in the CentOS-7.
while executing this command
login -a -s user_u -r s0 __default__ in CentOS-7 throwing the below error.
ValueError: Linux User __default__ does not exist.
Is there any way to overcome this issue?

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Why Default user is not created in CentOS7

Post by avij » 2017/11/16 08:39:04

There are no "default" user accounts in CentOS apart from the root user. You will need to create the user accounts you need. I also wonder about the parameters of your login command, they are not from CentOS 7.

Code: Select all

$ login -a
login: invalid option -- 'a'
usage: login [ -p ] [ -h host ] [ -H ] [ -f username | username ]
What are you really trying to do?

Tyrion
Posts: 2
Joined: 2017/11/16 08:21:36

Re: Why Default user is not created in CentOS7

Post by Tyrion » 2017/11/16 08:45:42

Hello,

There are no default users except the ones created and managed by the packages you install. You can, beside your root password, create a 'default' user in the CentOS 7 installation process if you meant this.
Best regards,
Tyrion

vyshnav
Posts: 60
Joined: 2017/09/12 03:37:54

Re: Why Default user is not created in CentOS7

Post by vyshnav » 2017/11/16 09:14:20

avij wrote:There are no "default" user accounts in CentOS apart from the root user. You will need to create the user accounts you need. I also wonder about the parameters of your login command, they are not from CentOS 7.

Code: Select all

$ login -a
login: invalid option -- 'a'
usage: login [ -p ] [ -h host ] [ -H ] [ -f username | username ]
What are you really trying to do?
I was trying to change default user domain from unconfined_t to system_t.

User avatar
avij
Retired Moderator
Posts: 3046
Joined: 2010/12/01 19:25:52
Location: Helsinki, Finland
Contact:

Re: Why Default user is not created in CentOS7

Post by avij » 2017/11/16 12:37:56

Ok, so you are using semanage login. That clarifies the situation a bit. Sorry, I don't know the answer to your question, but perhaps others can help. Also see man default_contexts if there's anything useful in there.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Why Default user is not created in CentOS7

Post by TrevorH » 2017/11/16 13:00:56

What's the output from semanage login -l ?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply