I'm using slackware 14.2, and i want to create directory public_html in /home/*/ when i create user. I saw there's a file useradd in /etc/default/, but i don't know, if this file should be editing.
Asked
Active
Viewed 361 times
0
-
1Stack Overflow is a site for programming and development questions. This question appears to be off-topic because it is not about programming or development. See [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. Perhaps [Super User](http://superuser.com/) or [Unix & Linux Stack Exchange](http://unix.stackexchange.com/) would be a better place to ask. – jww Dec 17 '17 at 13:50
1 Answers
2
Like that:
# mkdir /etc/skel/public_html
# useradd -s /bin/bash -m -d /home/user1 user1
# ls -Al ~user1
total 4
drwxr-xr-x 2 user1 user1 4096 Dec 9 11:43 public_html

Arkadiusz Drabczyk
- 11,227
- 2
- 25
- 38
-
Where is this file? in /etc/default/useradd ? And why you use #, it's comment – Marcin Marcin Dec 17 '17 at 13:59
-
What file? What's unclear in `/etc/skel/public_html`? To anyone who downvoted this answer - dare to explain? – Arkadiusz Drabczyk Dec 17 '17 at 14:01
-
No, `#` here is a prompt. I use `#` to represent `root`, I would use `$` to represent a non-root user. – Arkadiusz Drabczyk Dec 17 '17 at 14:05