Results 1 to 3 of 3
I don't quite understand /etc/skel. I know that everything in /etc/skel will effect all NEW users, and that's about it.
Basically, what I'm trying to do is add the directories ...
- 03-31-2011 #1Just Joined!
- Join Date
- Jan 2011
- Posts
- 87
How do I add directories to a new users /home?
I don't quite understand /etc/skel. I know that everything in /etc/skel will effect all NEW users, and that's about it.
Basically, what I'm trying to do is add the directories "home" and "work" to the users /home directory.
How do I do this?
- 03-31-2011 #2Linux Newbie
- Join Date
- Nov 2008
- Location
- Tokyo, Japan
- Posts
- 243
Well, the /etc/skel files is specifically used by the "useradd" command, so you must use that command to create a user account.
If you already have a user account, and you want to add directories to it, it is very simple:The "sudo -u username" lets you execute commands like "mkdir" as if you were the user "username". You could also do an interactive "sudo" session like this.Code:sudo -u some_guy mkdir /home/some_guy/work sudo -u some_guy mkdir /home/some_guy/home
Code:sudo -i -u some_guy ###Now you are executing commands as if you were the user "some_guy". cd mkdir work mkdir home exit ###Now you are back to your old self again
- 03-31-2011 #3


Reply With Quote
