List system users and.. | 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 !!

List system users and..

UNIX for Dummies Questions & Answers


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 04-24-2012
mentoscz mentoscz is offline
Registered User
 
Join Date: Apr 2012
Last Activity: 24 April 2012, 10:30 AM EDT
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
List system users and..

Hello i need fast help... script which will list only human users from /etc/passwd and find out if they have something in home. Thanks
Sponsored Links
    #2  
Old 04-24-2012
methyl methyl is offline Forum Advisor  
Advisor
 
Join Date: Mar 2008
Last Activity: 18 April 2014, 5:13 AM EDT
Posts: 6,396
Thanks: 287
Thanked 672 Times in 642 Posts
What Operating System and version do you have and what Shell do you use?

Please define "human users". It will vary from site-to-site.

Please define "have something in home". Phrase is meaningless.

Is this a dynamic enquiry about people currently using the system or a static enquiry about every possible user of the system.
Sponsored Links
    #3  
Old 04-24-2012
mentoscz mentoscz is offline
Registered User
 
Join Date: Apr 2012
Last Activity: 24 April 2012, 10:30 AM EDT
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
I dont know... im newbie

I need to list users from /etc/passwd and list if they have any directory in home

ex.

nobody: Not permitted to read
melian: Not permited to read
Another: Not permitted to read
Someone: Empty home
Noone: Empty home
...

with for cycle

Last edited by mentoscz; 04-24-2012 at 08:07 AM..
    #4  
Old 04-24-2012
vbe's Avatar
vbe vbe is offline Forum Staff  
Moderator
 
Join Date: Sep 2005
Last Activity: 14 September 2014, 8:06 AM EDT
Location: Switzerland - GE
Posts: 5,703
Thanks: 156
Thanked 400 Times in 375 Posts
Looks very much like unix introduction classwork to me...
In your last post you give clues on where to start :
Quote:
directory in home
Though not 100% but you could believe that users have a users directory in a common home directory... standards would be /home, /export/home (solaris) etc...
Sponsored Links
    #5  
Old 04-24-2012
mentoscz mentoscz is offline
Registered User
 
Join Date: Apr 2012
Last Activity: 24 April 2012, 10:30 AM EDT
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
well i dont know how to explain it. Im not native english speaker


I have to use for cycle for this.
Sponsored Links
    #6  
Old 04-24-2012
methyl methyl is offline Forum Advisor  
Advisor
 
Join Date: Mar 2008
Last Activity: 18 April 2014, 5:13 AM EDT
Posts: 6,396
Thanks: 287
Thanked 672 Times in 642 Posts
Please post the output from these commands, blotting the machine name with X's.


Code:
uname -a

echo "${SHELL}"

Sponsored Links
    #7  
Old 04-24-2012
mentoscz mentoscz is offline
Registered User
 
Join Date: Apr 2012
Last Activity: 24 April 2012, 10:30 AM EDT
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Linux drak 2.6.32-40-386 #87-Ubuntu SMP Mon Mar 5 23:03:22 UTC 2012 i686 GNU/Linux


I need to make a script which will list human users ( not computer ones ) from /etc/passwd and find out if their home directory is empty or not.

Last edited by methyl; 04-24-2012 at 08:56 AM..
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
List users and groups m3y UNIX for Dummies Questions & Answers 2 05-03-2011 12:35 PM
List of users on an AIX system ggayathri Emergency UNIX and Linux Support 5 06-24-2010 09:42 PM
IF $USER is not in this list of users, then do this glev2005 Shell Programming and Scripting 5 10-15-2009 03:34 AM
Get the list of logged in users xyzt Programming 2 04-15-2009 02:44 PM
Find users using system(List them only once) xBuRnTx UNIX for Dummies Questions & Answers 3 10-03-2005 06:37 AM



All times are GMT -4. The time now is 10:03 PM.