Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Help needed: user directory, /home/user - how?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
Sho
n00b
n00b


Joined: 26 Sep 2002
Posts: 48

PostPosted: Fri Sep 27, 2002 9:05 pm    Post subject: Help needed: user directory, /home/user - how? Reply with quote

Hi there,

I believe I have a very stupid problem. I'm used to every user having an own sub-directory in /home. Well, I added an user called "sho", and there is no /home/sho now. I can mkdir' one, of course, but I'm not sure that's right - cause' where do those nifty little .config files come from, then? And I don't really know the right commands to make it actually usable by sho (something with chmod, I guess).

Edit: Guess it matters. Using Gentoo 1.4 RC1.

Also, I'm very sorry about my cruel English and I want to apologize for any inconvenience that might cause.
Back to top
View user's profile Send private message
maxpower
n00b
n00b


Joined: 07 Aug 2002
Posts: 65
Location: South Korea

PostPosted: Fri Sep 27, 2002 9:22 pm    Post subject: Reply with quote

When you create your user use the -m flag to automatically create the directory. The profile files will be automatically copied over when you login.

mAx
Back to top
View user's profile Send private message
Sho
n00b
n00b


Joined: 26 Sep 2002
Posts: 48

PostPosted: Fri Sep 27, 2002 9:45 pm    Post subject: Reply with quote

I believe it worked - directory is there and usable now, though there still aren't any .config files (bash, X, xft). I guess those I will have to create manually?

Thank you very much for your fast help!
Back to top
View user's profile Send private message
maxpower
n00b
n00b


Joined: 07 Aug 2002
Posts: 65
Location: South Korea

PostPosted: Fri Sep 27, 2002 9:57 pm    Post subject: Reply with quote

The mandatory files should be created on first login, some files will have to be created manually and others will get created when you run that particular program. You can always copy the files from another home directory if you have them set up the way you like.

mAx
Back to top
View user's profile Send private message
Sho
n00b
n00b


Joined: 26 Sep 2002
Posts: 48

PostPosted: Fri Sep 27, 2002 10:54 pm    Post subject: Reply with quote

Aye. Again, thank you very much!

Last edited by Sho on Fri Sep 27, 2002 10:55 pm; edited 1 time in total
Back to top
View user's profile Send private message
jules
n00b
n00b


Joined: 25 Aug 2002
Posts: 29
Location: Denton, TX

PostPosted: Fri Sep 27, 2002 10:54 pm    Post subject: Reply with quote

or

Code:
emerge superadduser


that should simplify your life.
Back to top
View user's profile Send private message
Jeld
Tux's lil' helper
Tux's lil' helper


Joined: 28 Jun 2002
Posts: 84
Location: NYC, US

PostPosted: Fri Sep 27, 2002 11:19 pm    Post subject: Reply with quote

useradd -m will automatically copy all the files in /etc/skel directory to the new home dir. If you want every user to get particular configs put your files there.
_________________
package JAPH;sub x{$/='$';@1=map{$_=ord;$_--;chr}
split//,<DATA>;@2=map{$_=ord;$_++;chr}split//
,<DATA>;$_=sub{$.++%2?shift@2:shift@1};bless$_;}
1;$x=JAPH->x;for(1..25){print&$x,;}__DATA__
Kt!ouf!fmIdf"$ts@ngqOq`jq
Back to top
View user's profile Send private message
biroed
Tux's lil' helper
Tux's lil' helper


Joined: 16 Aug 2002
Posts: 147
Location: Amsterdam

PostPosted: Sat Sep 28, 2002 8:26 am    Post subject: Reply with quote

Sho wrote:
I believe it worked - directory is there and usable now, though there still aren't any .config files (bash, X, xft). I guess those I will have to create manually?

Thank you very much for your fast help!

passwd sho
usermod -s /bin/bash sho
usermod -G users,wheel sho
Back to top
View user's profile Send private message
_SkeLeToN_
Guru
Guru


Joined: 12 Sep 2002
Posts: 506
Location: Montreal,Canada

PostPosted: Sat Sep 28, 2002 7:03 pm    Post subject: Reply with quote

By the way I have a question.

When I add user like this : adduser -d /home/user -s /bin/bash -m -k /etc/skel -p test user

It create the user with the home dir and everything but when I try to log into that user i always get invalid password. So to resolve the problem I have to edit /etc/shadow and remove the test portion which is the password and save it. So when I log back for the password I push enter and log into the user then I use the passwd command and the password will now worked.

I try without -p but i got some garbage in the /etc/shadow for that user and I need to remove it before I log into that new user ... this is really odd why does it do that ?

Gentoo 1.4rc1
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Sat Sep 28, 2002 7:06 pm    Post subject: Reply with quote

An answer to _SkeLeToN_'s question might be found here.

For normal useradd questions, see Adding users.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum