hey OT linux people....

Soybomb

Diamond Member
Jun 30, 2000
9,506
2
81
Any of you linux knowledge folk in here (shux, jonnyguru, etc) could you take a look at my thread here and give me a hand. I'm stumped :)Thanks
 

nd

Golden Member
Oct 9, 1999
1,690
0
0
Some ideas:

1) Just use a shell script with useradd and changing the permissions. Problem solved.
2) There are also some default options in /etc/default/useradd... I'm willing to bet you can change the default home directory permission here, but it isn't immediately obvious how.
 

nd

Golden Member
Oct 9, 1999
1,690
0
0
Helpless people :) Just search for the latest thread by Soybomb in the OS forum.. not difficult
 

Soybomb

Diamond Member
Jun 30, 2000
9,506
2
81
Link should work now :)
Any links to good basic scripting resources then? I havent done much like that and would need to see how to take input as a vairable such as making a script called webuser and then running
"webuser newuser"
to create newuser and then set the permissions for their directory.
Thanks!
 

nd

Golden Member
Oct 9, 1999
1,690
0
0
Scripting resources? Who needs 'em? Just look at some existing bash/sh scripts and it's pretty simple. I don't have the syntax memorized but I can usually get by.

For example (as root):

% cd /usr/sbin
% vim/emacs/pico/<insert favorite text editor here> webuser

---snip---
#!/bin/bash
/usr/sbin/useradd $1
chmod 701 /home/$1
chmod 751 /home/$1/public_html
---snip---

% chmod u+x webuser

Then just run &quot;webuser <username>&quot; when you want to add a new user.
 

Soybomb

Diamond Member
Jun 30, 2000
9,506
2
81
lol I still appreciate you all, *group hug* ;)
Thanks for the help, looks like that should work, and simple enough too :)