0

i ran sudo adduser dummyuser and followed the prompts to create the password etc. After logging in to the dummyuser account, it does not create any of the home sub-directories (such as Documents, Downloads, Desktop, etc). Some searches mentioned trying -m option but that option was not recognized.

When i try to run startx i get a bunch of lines of texts with a fatal server error: no screens found

I am running debian Raspbian 10 (buster).

EDIT: I read through the manpages for adduser and useradd and from my understanding adduser is the "friendlier" command to use. My understanding is that this invokes /etc/skel directories and I tried reading through those a bit too to get a better understanding.

When i run cat /etc/passwd I the user I created has the entry: dummyuser:x:1001:1002:dumm,user,:/home/dummyuser:/bin/bash so the home directory/path was created.

I guess my specific question is how do I run these commands to create the sub-directories such as desktop, downloads, documents and allow me access to startx without that error message?

5
  • Why did you install Debian?
    – joan
    Jun 18, 2020 at 18:01
  • I'm very much a beginner and still learning/teaching myself to work in the linux environment. I chose Debian as it was one of the most recommended for my situation.
    – CLopes1987
    Jun 18, 2020 at 18:17
  • a (self confessed) beginner has no chance of installing debian on a raspberry pi - did you mean raspbian (the old name for raspberry pi os) Jun 18, 2020 at 20:50
  • as for your problem, I take it there's no issue with the pi users home directory - assuming you're dealing with a raspberry pi Jun 18, 2020 at 20:51
  • @JaromandaX no there are no issues with pi directories, this only seems to occur when trying to add new users to the system. also, you may be right, reading cat /etc/os-release i believe i am in fact running raspbian, i apologize for the mix up
    – CLopes1987
    Jun 19, 2020 at 17:03

2 Answers 2

2

Your answer is here. You may have gotten the commands (adduser & useradd) confused, or you may not have missed a package in your Debian installation, or ... maybe you simply failed to read man adduser? In any case, both commands are available on Raspbian, and they both work. The rest is up to you - let us know if you have a specific question.

2
  • thank you for the reference link. I have updated the question to better accommodate the issue, if you could take a look i would greatly appreciate it!
    – CLopes1987
    Jun 19, 2020 at 17:27
  • @CLopes1987: I'm probably the wrong guy to ask as I've never used a GUI on Raspberry Pi - I've only done headless. But AFAIK, there is no way to add the other directories you want with adduser except doing it manually. "GUI people" should see @Ingo's answer here, which should probably be marked as the "accepted anser" to your question.
    – Seamus
    Jun 29, 2020 at 22:10
2

The adduser command only do the essential to create an account to be able to login on the command line. There is a skeleton (or template) of an user account in /etc/skel. When creating a new account this is just copied to the new home directory. Have a look at it with ls -a /etc/skel. You will not find the default home directories from the GUI there, like Documents, Downloads, Desktop, etc. But these will be created on the first login to the GUI with the new user. So just login as dummyuser to the GUI and you will get it.

3
  • I figured that those directories would be created when I logged in as dummyuser as well but for some reason they did not. I posted this afterwards when I could not figure out what else to do. Do I possibly need to change the GID to match the root/primary user so logging in can invoke /etc/skel - that's the only thing I can think of at this time?
    – CLopes1987
    Jun 21, 2020 at 22:15
  • @CLopes1987 /etc/skel is only a directory that is copied. It must be readable by others (everyone) and that is true. Check with ls -ld /etc/skel. It must have mode drwxr-xr-x. There is no need to fiddle with the Group ID. Have a focus on your GUI.
    – Ingo
    Jun 22, 2020 at 12:07
  • yes, that directory has read/execute mode for group and other
    – CLopes1987
    Jun 23, 2020 at 18:40

Not the answer you're looking for? Browse other questions tagged or ask your own question.