Creating files with New User | Unix Linux Forums | UNIX for Dummies Questions & Answers

  Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Creating files with New User

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-14-2013
mrm5102 mrm5102 is offline
Registered User
 
Join Date: Jul 2012
Last Activity: 19 December 2014, 6:15 PM EST
Posts: 168
Thanks: 82
Thanked 10 Times in 9 Posts
Creating files with New User

Hello All,

I just created a new user on a server running SLES 11, and I created the user using the command below:

Code:
# useradd -G nagios scpuser

But whenever I create a file or directory while logged in as this user it creates the file's ownership permissions as "scpuser:users"
instead of it using the name of the group I added it to when I created it...

Any idea how I can get it to create files/dirs with the user:group combo I used when I created the User...? I'm guessing when
this user creates files/dirs and it gives the group ownership as "users", I'm guess this is some sort of default behavior?

Anyway, basically I just want this user to create files/dirs and have the ownership/permissions be set
using User=scpuser and Group=nagios...
Any idea how I make this the default behavior for this user?

I verified that the scpuser is ONLY listed on one line, and that is with the 'nagios' group in /etc/group file.


Any thoughts would be much appreciated!

Thanks in Advance,
Matt
Sponsored Links
    #2  
Old 03-14-2013
Corona688 Corona688 is offline Forum Staff  
Mead Rotor
 
Join Date: Aug 2005
Last Activity: 19 December 2014, 8:26 PM EST
Location: Saskatchewan
Posts: 20,037
Thanks: 855
Thanked 3,457 Times in 3,229 Posts
How are you logging in to this user? That you're getting the wrong ownership is very odd.
Sponsored Links
    #3  
Old 03-14-2013
mrm5102 mrm5102 is offline
Registered User
 
Join Date: Jul 2012
Last Activity: 19 December 2014, 6:15 PM EST
Posts: 168
Thanks: 82
Thanked 10 Times in 9 Posts
Sorry all... Finally found the answer.

This command allows me to create files/dirs with the correct Group Ownership:

Code:
usermod -g nagios scpuser


Thanks,
Matt

---------- Post updated at 12:33 PM ---------- Previous update was at 12:32 PM ----------

Hey Corona, thanks for the reply...

I got it now, but I had tried logging in through ssh and also with 'su scpuser', and both had the same result.

But anyway it seems to be working now.

Thanks Again,
Matt
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Default user:group permissions while creating files and directories sunnysthakur Linux 3 09-08-2012 04:46 PM
Creating user in solaris kalyankalyan Solaris 2 05-26-2010 05:21 PM
Limiting length of user in while creating user Satya Mishra AIX 2 04-15-2005 03:40 AM
creating a new user rocker40 UNIX for Dummies Questions & Answers 7 05-04-2004 05:33 PM
creating a new user Newbie4ever UNIX for Dummies Questions & Answers 3 07-27-2002 10:51 AM



All times are GMT -4. The time now is 05:40 AM.