Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 199
  • Last Modified:

automatic useradd

How can i make a new user so that they have all the permisions and folder in the right way.

When i make a new user xxx with password yyy

I want to make /home/xxx/public_html
automatic and set allso the permissions to:
0711 to user
0755 to public_html
0644 to all enclosed files

I heart you can do that in the skel direction ?

rgd Henk de Sain
the Netherlands
0
gekopmac
Asked:
gekopmac
1 Solution
 
heskyttbergCommented:
Hi!

Yes!

cd /etc/skel
mkdir public_html
chmod 0755 public_html

I'm not sure waht you mean by the 0711 to user ?
Either you set permission 0755 on public_html dir or you set it too 0711, you can't set it both to 0755 and 0711.

0644 is default for files and 0755 is default for dirs.
Theese can be overidden by umask in /etc/profile or ~/.profile

Regards
/Hans - Erik Skyttberg
0
 
CleanupPingCommented:
gekopmac:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
paullamhkgCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept: heskyttberg {http:#8012002}

Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

paullamhkg
EE Cleanup Volunteer
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now