You are not logged in.

#1 2018-09-02 00:03:23

wesleynw
Member
Registered: 2018-09-01
Posts: 15

What groups should a new basic arch user belong to on the system?

Recently I switched from ubuntu to arch and I created a new user with:

useradd -m -G wheel wesley

I have sudo installed, so I assumed it would behave like ubuntu and the rest of the system would be read only, but I cannot even print the files with `ls` in any directory other than

/home/wesley/

Is there another group I need to add my user to be to have it behave like ubuntu or do I need to do

chmod -R 711 /

?

Also, is there a way to make the user start on boot in

/home/wesley

instead of

/

?

Thanks,
Wesley

Last edited by wesleynw (2018-09-02 00:04:07)

Offline

#2 2018-09-02 00:26:35

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: What groups should a new basic arch user belong to on the system?

How did you create the user initially?  What groups was the user in before you added wheel?  What is the output of `id` for that user?
Edit:
Removed the group wesley as I realized that was the user you were modifying.

Last edited by loqs (2018-09-02 00:27:41)

Offline

#3 2018-09-02 00:36:18

wesleynw
Member
Registered: 2018-09-01
Posts: 15

Re: What groups should a new basic arch user belong to on the system?

loqs wrote:

How did you create the user initially?  What groups was the user in before you added wheel?  What is the output of `id` for that user?
Edit:
Removed the group wesley as I realized that was the user you were modifying.

The user is only in the wheel group.

Offline

#4 2018-09-02 00:38:46

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: What groups should a new basic arch user belong to on the system?

loqs wrote:

How did you create the user initially?  What is the output of `id` for that user?

Edit:
The command for the user creation should be in the history of the root user.

Last edited by loqs (2018-09-02 00:43:01)

Offline

#5 2018-09-02 00:42:32

wesleynw
Member
Registered: 2018-09-01
Posts: 15

Re: What groups should a new basic arch user belong to on the system?

loqs wrote:
loqs wrote:

How did you create the user initially?  What is the output of `id` for that user?

I created the user with

useradd -m wesley && usermod -aG wheel wesley

The output of 'id' is:

uid=1000(wesley) gid=1000(wesley) groups=1000(wesley),985(users),998(wheel)

Offline

#6 2018-09-02 00:47:05

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: What groups should a new basic arch user belong to on the system?

stat / /home /home/wesley
printenv HOME

What filesystem did you use for / or /home if it is seperate?

Offline

#7 2018-09-02 00:53:05

wesleynw
Member
Registered: 2018-09-01
Posts: 15

Re: What groups should a new basic arch user belong to on the system?

loqs wrote:
stat / /home /home/wesley
printenv HOME

What filesystem did you use for / or /home if it is seperate?


I didn't create a seperate partition for home in installation, just a ext4 parititon for /

 printenv HOME 

gives

/home/wesley
 
File: /
Size: 4096  Blocks: 8  IO Block: 4096  directory
Device: 10303h/66307d  Inode: 2  Links: 17
Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid:  (   0/ root)
Birth: -

Offline

#8 2018-09-02 00:57:08

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: What groups should a new basic arch user belong to on the system?

Did you use `stat /` instead of `stat / /home /home/wesley` as some of the output seems to be missing.
Also please provide an example of attempting to list a directory that fails including any failure output.

Offline

#9 2018-09-02 01:07:11

wesleynw
Member
Registered: 2018-09-01
Posts: 15

Re: What groups should a new basic arch user belong to on the system?

loqs wrote:

Did you use `stat /` instead of `stat / /home /home/wesley` as some of the output seems to be missing.
Also please provide an example of attempting to list a directory that fails including any failure output.


Y'know what I just solved the problem, when I did

su wesley

it was bringing me to some random directory and saying:

ls: cannot open directory '.': Permission denied 

But once I move out from there it works.

But to solve this, is there any way I can change the starting folder of the shell when I move over to my user?
Such as /home/wesley?

Offline

#10 2018-09-02 01:10:55

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: What groups should a new basic arch user belong to on the system?

What does "move over to my user" mean? How are you logging in?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#11 2018-09-02 01:24:22

wesleynw
Member
Registered: 2018-09-01
Posts: 15

Re: What groups should a new basic arch user belong to on the system?

jasonwryan wrote:

What does "move over to my user" mean? How are you logging in?


I mean whenever I do su (user) from the root account, so open a terminal it opens into another directory. Is there a way I can set a default directory for my terminal to open in?

Last edited by wesleynw (2018-09-02 01:25:13)

Offline

#12 2018-09-02 01:34:41

loqs
Member
Registered: 2014-03-06
Posts: 19,113

Re: What groups should a new basic arch user belong to on the system?

Why do you not just login as that user?  Or use `su - wesley`?

Offline

#13 2018-09-02 01:38:05

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: What groups should a new basic arch user belong to on the system?

Isn't that kind of backwards?  You should login with wesley and then su to root as needed.

Offline

#14 2018-09-02 07:30:33

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: What groups should a new basic arch user belong to on the system?

please post `getent passwd wesley`


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

Board footer

Powered by FluxBB