Some problems...

Hi everyone, I’m facing some problems, maybe someone can help.
I installed opensuse 12.2 on a clean harddisk and I updated the “needed patches”.
I have no linux experience or whatsoever. At leased not before yesterday…
So I was testing some terminal commands (because everyone says that is the best way to do everything into). I’m still more a winGUI guy but maybe this will change…

Question 1a
a) I opened the terminal and gave myself root access with <su>
b) I made an new user with <useradd test> and gave it an password with <passwd test>, this worked fine.
c) I signed out to try the new user “test” and then a got an error: Cannot enter home directory using /. AND Call to inusertemp failed (temp directory full?). Check your installation. *.

Question 1b
I tried this first with <sudo useradd test>, gave the password, and got: “sudo: useradd: command not found”. I thought that sudo means that you execute one command with superuser acces? Apparently i was wrong?

Question 1c
After this I signed in with my normal account and went to the Yast2 – User and Group Administration and deleted the test account and create a new test account here. There was also not an home directory. Note that question came to turn off the auto logon. After testing this worked fine. Weird. Is GUI better? :slight_smile:

Question 2
Is the GUI KDE heavier than Windows 7 pro? I mean graphicall? Because its a bit slow now and then (opening the startmenu, scrolling, showing the 2nd desktop ed.). I have a “Intel Q33 onboard with and a core2duo E8400 3GHz” but a had never problems with W7.

Question 3
I installed opensuse from an bootable usb-drive and after the installation (I disconnected the usb-drive) opensuse asked for the usb data. After researching I found out that in the repository was a link to the usbdrive… Is this normal?

Greetings from the Netherlands!
PS: this was my first post on the forum, if the questions are too stupid or something, please say so. I probably have some more questions in the future ^_^*

Question 1b
I tried this first with <sudo useradd test>, gave the password, and got: “sudo: useradd: command not found”. I thought that sudo means that you execute one command with superuser acces? Apparently i was wrong?

That just means ‘useradd’ is not in the user path (by default). This would have worked though

sudo /usr/sbin/useradd test

Question 3
I installed opensuse from an bootable usb-drive and after the installation (I disconnected the usb-drive) opensuse asked for the usb data. After researching I found out that in the repository was a link to the usbdrive… Is this normal?

Yeas, it is. Usually, once the install is complete, any required third-party repositories can get added, and the install source removed, or at least disabled.

On Tue, 29 Jan 2013 23:46:02 +0000, sir chris wrote:

> Question 1a a) I opened the terminal and gave myself root access with
> <su>

Recommend “su -” be used instead, that ensures the non-root user
environment isn’t used, but root’s full environment is. The difference
is that you are at less risk of running something in the user’s bin
directory rather than the system tool intended.

As these questions sound like homework questions, I’m going to answer in
a manner suitable for that (ie, I’m not going to give you the answer, I’m
going to suggest how you can learn what you need to).

> b) I made an new user with <useradd test> and gave it an password with
> <passwd test>, this worked fine.
> c) I signed out to try the new user “test” and then a got an error:
> Cannot enter home directory using /. AND Call to inusertemp failed (temp
> directory full?). Check your installation. *.

Your useradd command is missing something. The error message tells you
what’s missing.

> Question 1b I tried this first with <sudo useradd test>, gave the
> password, and got: “sudo: useradd: command not found”. I thought that
> sudo means that you execute one command with superuser acces? Apparently
> i was wrong?

Above, I explained “su -”. The answer to this lies in understanding the
difference (hint, “sudo” is like “su” and not “su -”).

> Question 1c After this I signed in with my normal account and went to
> the Yast2 – User and Group Administration and deleted the test account
> and create a new test account here. There was also not an home
> directory. Note that question came to turn off the auto logon. After
> testing this worked fine. Weird. Is GUI better? :slight_smile:

“Better” is a subjective term. The GUI in this instance did something
you didn’t tell the system to do when you used useradd.

> Question 2 Is the GUI KDE heavier than Windows 7 pro? I mean graphicall?
> Because its a bit slow now and then (opening the startmenu, scrolling,
> showing the 2nd desktop ed.). I have a “Intel Q33 onboard with and a
> core2duo E8400 3GHz” but a had never problems with W7.

“heavier” in what sense? Memory? CPU requirements? Not really, no.
But a lot depends on the video driver you’re using, and if you’re not
using a hardware-accelerated driver, then performance will be not as good
as you might expect. If the system is memory-starved, it’ll swap to disk
(if there’s a swap file or partition), and that’s always less optimal
than having memory. Without a machine spec, it’s hard to say what the
issue is.

> Question 3 I installed opensuse from an bootable usb-drive and after the
> installation (I disconnected the usb-drive) opensuse asked for the usb
> data. After researching I found out that in the repository was a link to
> the usbdrive… Is this normal?

Yes. The install media remains as a source after the installation is
completed. You can use YaST to modify the repository list and remove the
install media.

> Greetings from the Netherlands!
> PS: this was my first post on the forum, if the questions are too stupid
> or something, please say so. I probably have some more questions in the
> future :slight_smile:

Welcome! These forums are intended for new users (and experienced users,
too), and we’re happy to help out. As I stated earlier, some of your
questions sound like they might be homework questions, so I’m working
from that assumption. If it turns out they’re not, great - but it’s not
usual for a new user of openSUSE to start by creating additional users
(in my experience), so that’s why I’m being cautious in these answers.

Of course, if that’s not the case, answers can be adjusted accordingly. :slight_smile:

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C
*

Question 1a
a) I opened the terminal and gave myself root access with <su>
b) I made an new user with <useradd test> and gave it an password with <passwd test>, this worked fine.
c) I signed out to try the new user “test” and then a got an error: Cannot enter home directory using /. AND Call to inusertemp failed (temp directory full?). Check your installation. *.

Invoking useradd like you did is insufficient. As a minimum, you need to create a home directory for the new user account with the -m option.

useradd -m test

You should read the man page for useradd. It is good practice to understand the cLI methods, but for a new user the GUI often simplifies the steps for you.

man useradd*

Welcome! These forums are intended for new users (and experienced users,
too), and we’re happy to help out. As I stated earlier, some of your
questions sound like they might be homework questions, so I’m working
from that assumption. If it turns out they’re not, great - but it’s not
usual for a new user of openSUSE to start by creating additional users
(in my experience), so that’s why I’m being cautious in these answers.

Of course, if that’s not the case, answers can be adjusted accordingly. :slight_smile:

@hendersj: That didn’t occur to me :slight_smile: In any case I hope the OP takes the time to learn some of these basic Linux principles to better their understanding, especially before doing anything that requires root privileges.

Please read this before you are going to do (to many?) things as root: SDB:Login as root - openSUSE

And while doing everything in the CLI is of course psooble, do not forget that system management tools are creted to mae the job of a system manager more easy. And the prefered system management tool of openSUSE is YaST. E.g. managing users with YaST will offer you advantages (like useradd will offer you advantahyes above doing everything manualy). And when you do not have a GUI (a text only installtion) YaST is still available, it has an ncurses interface and a pure CLI interface.

And because you seem to be very gready in learning the internals of Unix/Linux, I can stress the points in the link above about "doing hings as root), that

  1. use su - instead of su;
  2. using sudo instead of su - is useless usage of a tool that is not created for this case (it is created for letting other users do a restricted**(!)** set of commands as root).

I always wondered where root’s bash environment variables are stored as I’ve never seen a /root/.bashrc file in existence - although presumably you can make one?

I was surprised to read from that page:

Surely that’s not true! I usually have four or five virtual consoles on the go at the same time (e.g. mutt, irssi, etc… slrn once I work out how to make it work with this forum!) - it will be sad day if multiple virtual consoles disappeared!

Of course root can when he wants. The only thing is that on the creation of the root user the normal skeletons for end-users are not used. The idea behind it, I guess, that the normal skeletons contain to much things root does not need, or could even be dangerous for root. Thus root lives by the system defaults alone and by what root (being a system manager following best practises) changes himself.

That whole SDB page is probably not made for you. It is made for the Linux noob. That Linux noob can then become a lot more of a Linux guy and willthen probably by hiim/her self find out that (s)he can use these virtual consoles. As one only after leaning about their existance will find usage for the logical GUI sessions on logical screens above 7.

When we write teachings for beginners and we then start adding all the “but you can…” and “that is not 100% true because…” parahraphs, it will no longer be understood by any begiinner. It is the art of leaving out things.

On 01/30/2013 11:06 AM, flymail wrote:
> I was surprised to read from that page:
>
>
>> >SDB:Login as root - openSUSE](http://en.opensuse.org/SDB%3ALogin_as_root" Wrote:
>> >There are more terminal logins waiting for you at Ctrl-Alt F2 …
>> >Ctrl-Alt-F6, but they are less nice to see and almost nobody uses them
>> >(maybe one of them when number 1 hangs).
>> >
> Surely that’s not true!

unfortunately, folks who have a total of six months (or even less) in
Linux/openSUSE are able to write whatever they wish into the wiki as
well as give incredibly dangerous advice in these forums.

caveat emptor!!


dd
on the other hand, there are incredibly experienced users in both places
also…but, not always enough to clean up the mess as fast as the eager
new folks can make them.

On 01/30/2013 01:46 AM, deano ferrari wrote:
> ‘man useradd’ (http://linux.die.net/man/8/useradd)

sorry, but since that web page does not declare either the version of
useradd the man is written for, nor the date of the man, there is no way
to know if that on web version is correct, when compared to the man in
the OPs machine (which will match the installed executable)…

anyway, in all cases the openSUSE man may have different info that
that on the online page…


dd

First of all thank you all for the info!

@deano_ferrari

I didn’t know that sudo is for letting “others” do a restricted command,. And that the path stays the same as the “other” user. This an then another password than root I presume. Here is that still the same.

Is this a bug. When people who start with Linux and have nothing with computer see this kind of problems they will be thinking that something is very wrong and are maybe going to run back to windows.

@hendersj

I didn’t know the difference between su and su -. A strange difference, why would you ever use su.

I think it misses the temp directory in the user home’s home dir. But then its not very user friendly (also not necessary because you could go the GUI). Why would you make an new user without an homedir and wihout login possibility.

Is sudo and su the same? I think its better to have one su and one sudo (instead of su and su -).

I forgot to say that the memory is 4GB and a part is shared video memory (how much I couldn’t find). I was searching for an hardware info document maker to send over and I found on “alternativeto.net” Hardinfo as an alternative to Speccy or Hardware Lister to CPU-Z but they are not in an repository. Can I normally install or uninstall a loose program which is not in a repository. I would rather have one within the standard repositories. A also tried hardwareinformation from YaST2 but it that is a lot of data, not an normal overview.

They are probably all homework questions, you could answer every question by studying but this is helps to learn is a lot faster. Maybe I’m not an usual new user, I always want to know how everything works, including behind the scenes. I find it not weird to begin with users and their restrictions. I go to the terminal because there is something to learn, the GUI is often too simple, I use it to compare it to the terminal to learn.
I think I didn’t understand the last couple of sentences (maybe I’m not that good in english so that I understand the word jokes). Do you mean that if they are homework questions they will not be answered or that you could say something like “rtfm”. You may say that, I’m not feeling offended.

@deano_ferrari

I know that now, but why would you make an new user without an homedir and wihout login possibility. The man pages are informative! When you do thing with the GUI, then there is noting to learn anymore. You need the root password for almost everything in Linux (maybe for good reasons).

I will read it. You need the root password for almost everything in Linux (maybe for good reasons). I will certainly check the YaST in terminal. I will use su - for now but why is there sudo and su, o I know sudo for one command and su for multiple. But then there must be a difference in passwords for su and su- , I don’t understand it yet.

You need the root password for almost everything in Linux (maybe for good reasons)

This can get annoying when you are first switching over to Linux from Windows or Mac. The main difference is the need to be authorized when changing system settings like network, disk, etc… Once you get things set up and finish installing the programs that you need then you will not need to enter your password all the time.

… and there will come lots of times when you will be glad that the mistake you made doesn’t have “undesired system consequences” because you’re just a user.

On 01/30/2013 09:36 AM, sir chris wrote:

>> Your useradd command is missing something. The error message tells you
>> what’s missing.
> I think it misses the temp directory in the user home’s home dir. But
> then its not very user friendly (also not necessary because you could go
> the GUI). Why would you make an new user without an homedir and wihout
> login possibility.

Your system has lots of such users. Look at /etc/passwd and note all the lines
where the last field is either /bin/false or /sbin/nologin. As that field
indicates the shell to be run for the user, none of them can log into the
system. They can still own files and root can switch a running thread to their
ownership with “su - xxxxx”, but not having a login possibility enhances
security. MythTV is a user package that has a user that cannot log in. Setting
up this package is very difficult, but it would be even worse without this
pseudo user.

No, you do not understand it.

Try to understand what it means that Unix/Linux is a multi user system. It means that there are a build in barriers between the users and what they own. User A can not change the background of the desktop of user B, nor read his mails, etc. And neither user A or user B can change the system. There is only one user that can change system things and that is the Superuser. He is known shortly after his username: root. He is known to the kernel because of his userid (0), but for the rest he is a user as every other user.

Thus in your normal working life on the system you are user chris (just to invent a name) and chris can read his mail, browse the internet, configure his KDE/Gnome desktop environment, etc. Chris has only to provide his password once when he logs in. And that is it. No need for the root password for may be weeks on end.

Same for your wife (again presuming you have a wife, else take any other person in the house, or invent one to get the idea of what a multi-user system should do and refuse to do).

It is only when system management work is to be done that user root must be used. And yes, user root has his own password. That password should only be known by the person that is allowed to manage the system. And thus root must log in. Now that is tricky and years of experience have brought us a lot of “best practises” in doing this. You find some of them in the link I gave you.

Now you can of course start to chalenge those best practises, but as a person new to Linux, I am afraid you will not impress very many people. And when you want to know what commands like su and sudo do, on a Unix/Linux system there is one good answer for this: read the man page. Thus open a terminal and type:

man su

and

man sudo

which will bring you to type

man sudoers

A better readable version of the man pages you can get by starting Konqureror and use things like

man;/su

in it’s addressbar.

Thanks, for security reasons I can understand.

On 01/30/2013 04:36 PM, sir chris wrote:
> I will use su - for now but why is there sudo and su, o I know
> sudo for one command and su for multiple. But then there must be a
> difference in passwords for su and su- , I don’t understand it yet.

in this case the path to full understanding lies in the history of
Linux: before there was a Apple-Mac or a MS-DOS there were large
computers in the basements of (say) insurance companies, governmental
agencies, universities etc etc etc running UNIX (and other operating
systems)

there was ONE computer and hundreds or thousands of users all connected
to The computer from dumb terminals…

the users had access to their data and some sub-set of the total
system’s user applications and utilities…and no, or almost no access
to any parts of the operating system…

the system caretakers, worker bees and administratorS on the other hand
had access to the parts of the system they were competent in maintaining…

for example: the in-basement workers who took the hatbox sized
“harddisk” out of its storage location and ‘mounted’ it on the washing
machine sized ‘drive’ had all the permissions necessary to do their job
(which was a lot more than the users in all the various company/etc
departments) but still the drive mounters didn’t have the
passwords/permissions required to (for example) kick users off the
system or turn the machine off…

so, there was a RANGE of actions which required a means to allow some
folks to do some things and other folks to do other things…

so, Linux is still a multi-user environment…even on a laptop used by
one breathing person there are TWO: the root/administrator and the
owner/user…

if the user types su (which is short for Switch User) and provides the
root password s/he is allowed to use administrator permissions while
retaining his/her own environment (for example PATH)…and the same is
true for sudo except the user remains him/herself, retains his/her
environment and is ONE TIME given the ability to execute some subset of
utilities…

on the other hand, if typing “su -” (and giving the root password) the
user switches to become The Administrator and gains both administrator
permissions AND the administrator’s path, and has FULL rights to mount,
unmount, delete partitions, stop the machine, kick users off, etc etc etc.

sudo is even more complicated and is designed to allow The Administrator
to grant certain permissions to both users and ‘workers’, (for example)
The Administrator could give one worker the right to mount and unmount
disks, and another worker the right to stop the printer so more paper
could be loaded, and yet another worker might be given the permissions
needed to rearrange the jobs flowing to the printer so that (for
example) the company president could get his morning review of
yesterday’s sales before the lunch room supervisor’s menu for next
weeks operations were printed, even if s/he submitted the print job
yesterday!!

the permissions for each worker could be different from the next
worker/user AND the password of the user (not root) given with the sudo
command tells the system which permissions go to which individual
worker/user…

so, today we don’t have a bunch of workers needing specific and limited
rights so, while not true in all distros, in openSUSE the default is
sudo invokes one time root powers for a subset of utilities and requires
root’s password…in some other distros, the user uses his/hew own
password to access some subset of roots rights…

see man sudo, man sudoers


dd

Then use some common sense and type the command! The URL version is essentially the same , and any Linux bible will provide and explain the most basic options (one of which is to create a home directory for the new user) no matter what the version.

@deano_ferrari

I know that now, but why would you make an new user without an homedir and wihout login possibility. The man pages are informative! When you do thing with the GUI, then there is noting to learn anymore. You need the root password for almost everything in Linux (maybe for good reasons).

The options are all provided for various admin reasons. For example, it may be desired to manually copy over a home directory from another machine.