You are not logged in.

#1 2015-11-08 21:58:24

D314
Member
Registered: 2015-11-08
Posts: 5

[SOLVED] Adding a new user

Hello, I added a new user using useradd. How do I make this user have the same initial setup as the user made during the installation?

Thanks!

Last edited by D314 (2015-11-08 22:31:52)

Offline

#2 2015-11-08 21:59:42

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: [SOLVED] Adding a new user

Why do you want to do this?

http://xyproblem.info/

What do you mean by "initial setup"?


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#3 2015-11-08 22:02:01

damo
....moderator....
Registered: 2015-08-20
Posts: 6,703

Re: [SOLVED] Adding a new user

`adduser` is probably easier to use than `useradd`

Have a read of the manpages to see your options, and how to add  a user with defaults.


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#4 2015-11-08 22:07:52

D314
Member
Registered: 2015-11-08
Posts: 5

Re: [SOLVED] Adding a new user

Why do you want to do this?

I like the initial setup big_smile

What do you mean by "initial setup"?

This is what I mean when I say initial setup (this user was made during installation):

MJw_By_QP.jpg

This user I added manually:

Hzhm_ZXB.jpg

Have a read of the manpages to see your options, and how to add  a user with defaults.

I did, but I don't think that's the problem. The user is fine, I just want all the defaults that were setup to the first user on the new one.

Thanks!

~~~~~
Mod Edit: Changed oversized images to thumbnail links -- please limit images to 250x250
-HoaS

Last edited by D314 (2015-11-08 22:13:13)

Offline

#5 2015-11-08 22:17:49

damo
....moderator....
Registered: 2015-08-20
Posts: 6,703

Re: [SOLVED] Adding a new user

^ That's why you should use `adduser  name`.

If you don't use the right switches, useradd will set up the user configs from `/etc/skel`, which doesn't contain the BL configs.


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#6 2015-11-08 22:27:17

D314
Member
Registered: 2015-11-08
Posts: 5

Re: [SOLVED] Adding a new user

damo wrote:

^ That's why you should use `adduser  name`.

If you don't use the right switches, useradd will set up the user configs from `/etc/skel`, which doesn't contain the BL configs.

Woah! That worked! Thanks.
Where are the defaults used by adduser if it's not too much too ask? I checked /etc/adduser.conf but it says SKEL=/etc/skel.

Anyway, solved!

Last edited by D314 (2015-11-08 22:28:56)

Offline

#7 2015-11-08 22:30:57

damo
....moderator....
Registered: 2015-08-20
Posts: 6,703

Re: [SOLVED] Adding a new user

BL configs are in `/usr/share/bunsen/skel`

If you could add [SOLVED] to the title of your first post, it might help others looking for an answer wink


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#8 2015-11-09 04:32:32

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,283
Website

Re: [SOLVED] Adding a new user

D314 wrote:

Where are the defaults used by adduser if it's not too much too ask?

The defaults are as damo said, but adduser doesn't access them directly. Any user logging in for the first time via lightdm should trigger the transfer of config files, by a script called from lightdm's config file.

To be honest, I'm not sure why the useradd-created user didn't get set up. Did you login through lightdm that time?


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#9 2015-11-09 19:54:33

D314
Member
Registered: 2015-11-08
Posts: 5

Re: [SOLVED] Adding a new user

johnraff wrote:

To be honest, I'm not sure why the useradd-created user didn't get set up. Did you login through lightdm that time?

Yes I did. Here are the commands I used:

sudo useradd mari
sudo passwd mari
sudo usermod -a -G sudo,audio,dip,video,plugdev,netdev mari

(I copied the groups from the user created during installation)

Then I logged out (right click desktop -> exit -> log out) and logged in with the new user. Finally I solved it doing userdel and adduser.

Offline

#10 2015-11-10 05:25:05

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,283
Website

Re: [SOLVED] Adding a new user

^well, it's water under the bridge now, but if you were still with the unconfigured user I would have been interested in some more info about the things in your home directory, login experience etc...

(I'll see if I can reproduce your results on a VM.)

Glad you fixed it anyway.

UPDATE: It seems that if you use 'useradd -m' to create a user home directory then it works OK.
( https://forums.bunsenlabs.org/viewtopic … 7397#p7397 )
adduser is still recommended in most cases though.

Last edited by johnraff (2015-11-10 06:59:45)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

Board footer

Powered by FluxBB