adduser or useradd help, probably YaST

When I installed 42.3(prior to upgrade to 15.0), I ‘by-passed’ the USER creation panel, and went straight to root panel. Something I now regret to a degree. I have no excuse for doing so.

That install user panel had a box for ‘Use this Password for System Administrator’.
SO, I need to create a ‘new user’ that has admin access.

No problem creating the user in YaST, but getting it to have admin capabilities has got me stumped.
Is there a command line that will do it?
or a file to edit ?
or …?
Once again in my own fashion, this newbie strikes again!

PS> I have read so many articles from opensuse documentation and other searches that have me even more confused.
the su and sudo stuff along with parameters in sudoer file. Head spinning!

Please, don’t panic. Too many options to get this fixed.

Can you still boot the system?
Did you perform an install or an upgrade?

What is it you expect or want to achieve?

Did you read the docs re. upgrading?

No panic. just questions, and yes the options to remedy are mind boggling.

Well yeah, no problems after some ACPI messages >>> BUT still running as root.

I installed Leap 42.3 via USB media, THEN upgrade while ‘live’ to Leap 15.0 which is working fine(I presume).

I would like to have a non root user, that has admin access. Like I said in OP, I ‘skipped’ the New User panel during the install of 42.3.

Numerous times, and a lot of trepidation, but it upgraded fine.

My main concern here is getting the non root user to have administration access >> The part I skipped over in the install process where it asked if I wanted the USER password to be used for Administration access. I can get a screen shot from a opensuse install article if needed of that install panel.

Hi,

To add new user and create home:
useradd --create-home your_user

passwd your_user - to create a password

to change a user home directory
usermod -d /home/new_home -m your_user

to add a user to a group
usermod -aG what_group your_user

The group wheel is the administration group.
Add you user to that group:
gpasswd -a your_user wheel

I miss connection between the first and second sentences. The installer asked you for root password which you obviously know as you are logged in as root. User created during installation has no special privileges, there is no special “admin access”. Where have you got this idea? Just create normal user as usual.

You can become root as a normal user at anytime to do administration. You don’t need a special user. The installer defaults to using the same password for root and the first user but that does not give that user special privileges.

So you understand what was happening and your result…

By default, the installer will create a normal non-root User, ask you whether you want to make the password for your new User account the same as your root account (root is God on your machine) and whether to make your User the “System Administrator” for your machine. The “System Administrator” role is really only for bookkeeping purposes like where to send machine internal messages, it’s not the same as root which has real power permissions on your machine.

When you bypassed creating a normal User, the machine then asked you to create a password for root, because regardless whether there are other Users on your machine or not, root always has to exist and its User name (root) and related UID cannot change, those are staticly set and the same on every machine.

The result is that when your installer completes, your machine should be pretty normal… But, it will only have root set up on your machine because that’s all you have set up.

Now, any time you create a User on a Linux box (using YaST or the command line, both are acceptable), your User is assigned to at least one UserGroup. YaST will set you up with defaults most people will be happy with, so it’s probably preferable;

In Linux, we don’t have User-based security like what you may be used to in MSWindows where there is always “the” Adminstrator 500 account (comparable to root) and a Local Administrators group where you can place any Users to grant them local Administrator (near-God second only to the 500 account) permissions on the machine. Instead, on Linux we provide a means to temporarily elevate an ordinary User’s permissions(su and sudo commands in a console) to accomplish specified tasks, afterwards the User is dropped down to normal permissions. This is almost universally considered superior to the Windows Administrators group method, and indeed with Win8 and Win10 Microsoft introduced “Run As Administrator” to improve the MSWindows security model.

We do have the Wheel group as @another_roadrunnier describes,
But you should be very careful with that, and it’s not quite the same as what exists in the MSWindows Administrator group. I’ve personally only ever used it in special situations to tie together services running on a machine, never granting that capability to User accounts with local login capability. But, you will find some blogs and guides that do use the wheel group with ordinary User accounts.

HTH,
TSU

Maybe this image will explain what I am saying that you didn’t understand.
http://susepaste.org/77375859

Just for the record:
Image labeled 'Create New User about half way down in this article.
http://www.opensuse-guide.org/installation.php

Look closely at the boxes below the user name and password fill ins.

Clearly a box that states "Use this Password as System Administrator’.

And a radio button below that that is the ‘Skip this Creation’ which I should not have done!

Hi:

That dialogue will create two users, if you do not skip.

One is your User, the other is root aka System Administrator.

That choice simply gives your User and root the same password, but they are still separate Accounts on that system.

You should run GUI only as User, not as root, because it will wind up destroying your system at some point.

When you need to do something Administrative, you will (most often) be given the choice to do that task as root/Administrator.

Other things, such as working as root on the command line, are carried out using one of various methods depending on what you are trying to accomplish.

Help for such things can be found when you ask here.

… and, Good for your Enthusiasm!:wink:

To do what should have been done: to create a user.

Boot into the GUI login screen (do NOT login there, you have only the root user and root should NEVER login in the GUI).
Ctrl-Alt-F1 will now bring you in the console and a CLI login.
Login with root (the only user you have).
Give the command

yast

This will bring you into the ncurses interface of YaST.
Use arrow keys, etc. to go to Security and Users and then to Users and groups.
That is the place to create your user.

On 2018-06-04, BillLyte <BillLyte@no-mx.forums.microfocus.com> wrote:
> When I installed 42.3(prior to upgrade to 15.0), I ‘by-passed’ the USER
> creation panel, and went straight to root panel. Something I now regret
> to a degree. I have no excuse for doing so.
<SNIP>

… or since the time of you’re first post you could have repeated the openSUSE installation (several times…).

Or the time it took you to make this ‘reply’ to a serious question, by a new user that is trying to learn things, NOT how to install Leap over and over and over, until it is right…

Any way, I have ‘me’ set up as a new user and running from the new user account.
Now on to better things to do than read snitty comments.

On 2018-06-06, BillLyte <BillLyte@no-mx.forums.microfocus.com> wrote:
> Or the time it took you to make this ‘reply’ to a serious question, by a
> new user that is trying to learn things, NOT how to install Leap over
> and over and over, until it is right…

…apologies - I wasn’t meaning to cause offence.

My response was serious. Reinstallation takes less than an 30 minutes and if you script automated installation of your
preferred settings, repositories, and programs you can often have the whole thing done often in far less time (e.g. <
1hour) than it takes to resolve many issues. On mission critical systems, if you aren’t 100% sure of your OS
installation, you would be very brave not to reinstall.

Thanks for this.

My ideas about this.

While I am with the OP that installing and installing again just for every particle of dust that is found is not a good idea (at least not in Linux). However, this case, where a panel in the installation was filled in wrongly, a re-install, just to do it correct and thus avoiding all sorts of repairing, would probably have been best.

I say this because it seems that the OP, in his trials to use the system, seems to have used the root account to log in into the GUI, which is a very bad thing to do. So one slip of the mouse leaded into other bad actions. If I interpret the OPs posts correct.

To the OP.
The answers above may look a bit confusing because they are about different aspects of what you reported and some are even of more theoretical value. First please take into account that people here are mostly only trying to help. Even if you may think that answers are not touching your problem, that is not on purpose. Understand please that misunderstandings are very easy to develop because people can not look over the shoulders of others and thus depend on descriptions.

E.g. you have in effect only one problem, you skipped creating a “normal” user. But you mentioning the infamous check box for giving that user (which did not create at all) the same password as root (which is in the opinion of many here is a bad thing to do), led people here to concentrate on that check box and what it does instead on concentrating on how you could create a “normal” user in your situation.

The above is my interpretation after reading he thread. My interpretation can be wrong also.

In any case, in a post above, I tried to explain how you can create that user using YaST without using the GUI as root. I assume it would have solved your problem without the need to re-install. And you it may be that you would have learned several things on the go. E.g. how to use YaST from the CLI.

I take everything posted in response to my questions seriously, except the ones that IMO were said tongue in cheek and not helpful to my question.

I realize a ‘re-install’ does not take the long IF there was little to save and redo.

My Leap 15 USB didn’t work out for me.
The partition manager in the 15 install and I did not get along! (Another newbie problem on my part). It kept want to write to my MBR(NOT ABOUT TO HAPPEN), and at one point even suggested deleting my Win10 partition(ANOTHER NOT ABOUT TO HAPPEN). So I aborted and installed 42.3 intending to stay with it a while, but got antsy to get to Leap 15.

And I wasn’t about to install 42.3 again, then another upgrade to 15.0 after getting a heck of a lot of things done that I didn’t want to lose, even if it was in the ‘root’ account.

All I needed was a way to get a user added from within a working Leap 15 as root, and give it some admin privileges.(I thought that was what GUI YaST was suppose to do?)

My question was succinctly answered by a couple of other users in this thread(hcvv being one of them, and ‘another-roadrunner’ as well).
I have my ‘user’ account up and running, and got around the ‘root ownership’ of more than a couple of files and downloads i needed to move/copy into my /uname/home directories.

So, to finalize:
I have a user account. I am using it. I am enjoying the learning experience as a 75 year old nearly shut-in due to health. Actually relearning as I knew HP-UX from work and a SuSe boxed CD set I bought to keep my mind in the game at home.

I apologize if I took a statement wrong, and responded badly.
Bill L

On 2018-06-06, BillLyte <BillLyte@no-mx.forums.microfocus.com> wrote:
> I realize a ‘re-install’ does not take the long IF there was little to
> save and redo.

Operating systems can be replaced. Data cannot. As long as data is properly backed-up, operating systems are entirely
disposable.

> My Leap 15 USB didn’t work out for me.
> The partition manager in the 15 install and I did not get along!

The best partition manager IMO is GNU parted. It’s the same in all GNU/Linux distributions and by far the most powerful.

> (Another newbie problem on my part). <SNIP> So I aborted and installed
> 42.3 intending to stay with it a while, but got antsy to get to Leap 15.

If you’re a newbie, I’d strongly advise against installing Leap 15 until July by which time hopefully most bugs will be
squished for the new release.

> And I wasn’t about to install 42.3 again, then another upgrade to 15.0
> after getting a heck of a lot of things done that I didn’t want to lose,
> even if it was in the ‘root’ account.

If you’ve done `heck of a lot of things’ within a desktop login from the root account that was supposed to have be done
in user space, then I fear for the security of your installation. Windows might produce the greatest number of viruses,
but GNU/Linux boxes are the most commonly hacked.

All I needed was a way to get a user added from within a working Leap
15, and give it some admin privileges.(I thought that was what YaST was
suppose to do?)

I don’t know what you mean by admin privileges. By default, openSUSE does not support the `superuser’ mentality adopted
by Ubuntu and its derivatives. I believe the openSUSE approach is more secure: proceed with minimum user privileges,
only invoking root privileges when required.

> I have my ‘user’ account up and running, and got around the ‘root
> ownership’ of more than a couple of files and downloads i needed to
> move/copy into my /uname/home directories.

Please check - it should be /home/uname/ not /uname/home.

> I have a user account. I am using it. I am enjoying the learning
> experience at 75 years old(actually relearning as I knew HP-UX from work

Good to hear. My father is in late 70s and tinkering with GNU/Linux (he’s on Mint), but when it comes to tricky jobs, he
leaves this to me… he prefers to know he’s working in a safe, robust, and reliable working environment over tweaking
configurations experimentally.

> I apologize if I took a statement wrong, and responded badly.

No worries; no harm done. The help coming from this forum comes from busy volunteers, with impressively high
signal/noise ratios in the content. But please be prepared for brief responses even if some may come across as brusque.

That is good to hear. Glad things are working out.

Yes, being new at it can bring confusion, which is why I explained the purpose of what the installer does at that User creation point. Thought you should understand it better for the future.

Good on you for your perseverence.

I apologize if I took a statement wrong, and responded badly.

Happens, unfortunately. I can totally understand the frustration at times like that, especially when it is all so foreign to you. Been there myself.:wink:

… many of us here are in that general age group, as well.

Many in lots of other age groups, as well, but you are not alone.

nearly shut-in due to health.

Quite a few people here with that problem, as well.

Glad to have you here, encouraged by your enthusiasm.