Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

Re: FN-FORUM Users on FreeBSD

date posted 1st February 2003 03:02

Well it's nearly 3am, not alot to do but follow up on your own posts... :)

I've been digging around, as my original answer below probably doesn't
answer your question totally. What rights to the users have?

AFAIK there are two ways a user can get root priv's -- this is through being
in the group 'wheel' AND knowing the roots password, or being a sudoer. If
you have never installed sudo, ignore what I will say about it.

I have been looking around for a bit, and cant find an easy way to do this,
maybe someone here who's great at perl can knock up a script in 2 seconds,
or maybe someone knows a much much easier way, but for now... :)

'id' is a useful tool, it will tell you if the specified user is in the
group 'wheel' (that means they have access to root access IF they know the
root password), but sadly you have to specifiy the user... however, you
could have a script which looks in /home/ for all users, and then runs the
'id' tool for each one until at the end, whilst grepping the output for
wheel. Dont know if that makes sense, its rather late...

So, the script does:

ls /home/
gets a list of users
id -p |grep wheel
id -p |grep wheel

and so on, the output looks like this

[CS]02:53:15 0 $ id -p ben |grep wheel
groups ben wheel
[CS]02:53:34 0 $ id -p ant |grep wheel


This tells you then ben (thats me :) is in the 'wheel' group, so if they
know the root password, they can have root access. Like I said, really long
winded but it tells you. The other is sudoers, the sudoers file
/usr/local/etc/sudoers will contain details of all users that have
access.... Now, this may/may not work depending on how/IF you have the
sudoers file setup. Do you use sudo? If so, the three main groups are
fulltimers, parttimers and webmasters, but you can alter it how you like,
and if you've altered it, then you know what they are ;) to checkout the
output you can do:

cat /usr/local/etc/sudoers |grep FULLTIMERS
cat /usr/local/etc/sudoers |grep PARTTIMERS
cat /usr/local/etc/sudoers |grep WEBMASTERS

Remember, by default there are loads of made up users, so if it doesnt look
right, check to see if the line is commented out with a #

does this make sense? I wouldn't be surprised if it didnt. I think its time
for bed....

Hope it helps anyway :)

Ben

--
Ben Waters
ChunkySystems
http://www.chunkysystems.co.uk





----- Original Message -----
From: "Ben Waters" [EMAIL REMOVED]
To: [EMAIL REMOVED]
Sent: Saturday, February 01, 2003 12:27 AM
Subject: Re: FN-FORUM Users on FreeBSD


> What version of BSD?
>
> Depending on the versions of BSD it may be different, and I dont know the
> best way to do this tbh, but to list *ALL* users you can do
>
> cat /etc/passwd
>
> and if you have given them all bash shells, the easiest way to filter out
> teh crap ones is:
>
> cat /etc/passwd |grep bash
>
> or replace bash with whatever their shell is.
>
> HTH,
>
> Ben
>
> --
> Ben Waters
> ChunkySystems
> http://www.chunkysystems.co.uk
>
>
> ----- Original Message -----
> From: "John Wards" [EMAIL REMOVED]
> To: [EMAIL REMOVED]
> Sent: Friday, January 31, 2003 7:14 PM
> Subject: FN-FORUM Users on FreeBSD
>
>
> > Hi folks,
> >
> > Quick question, any ideas how to list users on FreeBSD and find out
about
> what
> > rights they have on a system etc?
> >
> > Cheers
> > John
> > ========
> > Freelancers and Freelance Jobs: http://www.freelancers.net
> >
> > Advertise with Freelancers.net http://www.freelancers.net/advert.php
> >
> > To unsubscribe please email:
> > [EMAIL REMOVED]
> >
> > If you have difficulties unsubscribing please email:
> [EMAIL REMOVED]
> >
>
>
> ========
> Freelancers and Freelance Jobs: http://www.freelancers.net
>
> Advertise with Freelancers.net http://www.freelancers.net/advert.php
>
> To unsubscribe please email:
> [EMAIL REMOVED]
>
> If you have difficulties unsubscribing please email:
[EMAIL REMOVED]
>



Messages by Day
February 28th 2003
February 27th 2003
February 26th 2003
February 25th 2003
February 24th 2003
February 23rd 2003
February 22nd 2003
February 21st 2003
February 20th 2003
February 19th 2003
February 18th 2003
February 17th 2003
February 16th 2003
February 15th 2003
February 14th 2003
February 13th 2003
February 12th 2003
February 11th 2003
February 10th 2003
February 9th 2003
February 8th 2003
February 7th 2003
February 6th 2003
February 5th 2003
February 4th 2003
February 3rd 2003
February 2nd 2003
February 1st 2003


Messages by Month
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000