- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: the cmd to chk file permissions for all the us...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2010 05:30 AM
тАО06-16-2010 05:30 AM
1. whats The command to check the total number of users in HP-UX 11IV1, i got the users in etc/passwd, is there any other way to chkeck the list of users?
2.whats the command to check the file permission for the list of users in HP-UX 11IV1?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2010 07:06 AM
тАО06-16-2010 07:06 AM
SolutionNumbers of users:
cat /etc/passwd |wc -l
The second one is a bit weird - but to get filepermissions for all users:
for i in `cat /etc/passwd | awk -F ':' {'print $1'}
do
find / -user $i -exec ls -l \+
done
This will find ALL files owned by each user in /etc/passwd - and list the files with its permssions.
I might have misunderstood the last question, but maybe you can reuse the cmd's to your fit your needs.
Greetings
Danny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2010 07:34 AM
тАО06-16-2010 07:34 AM
Re: the cmd to chk file permissions for all the users
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2010 07:35 AM
тАО06-16-2010 07:35 AM
Re: the cmd to chk file permissions for all the users
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2010 07:59 AM
тАО06-16-2010 07:59 AM
Re: the cmd to chk file permissions for all the users
> in my second question i want to know the " to which group the users are belonging or what are the users under which group?
# logins -m
...will list users and all of the groups to which they belong. As always, consult the manpages [logins(1M)] for more information.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2010 09:12 AM
тАО06-16-2010 09:12 AM
Re: the cmd to chk file permissions for all the users
logins -m seems to show the user id and primary group of each user.
For more complete information, consider these options:
-d Display logins with duplicate UIDs.
-m Show multiple group membership data.
-o Display with alternate format of one line of colon separated
fields.
-p Display logins with no passwords
-s Display all system logins
-t Sort output by login rather than UID.
-u Display all user logins.
-x Display extended information about selected users. This extended information includes home directory, login shell and password aging data, each on its own line. Password information consists
Standard input
Group number information can be obtained in a more compact fashion with the id command
id username
both id and logins data are useful for writing management scripts.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2010 09:17 AM
тАО06-16-2010 09:17 AM
Re: the cmd to chk file permissions for all the users
thanks, i got what i expected from yours.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2010 09:29 AM
тАО06-16-2010 09:29 AM
Re: the cmd to chk file permissions for all the users
For an individual user login, 'id' is useful, indeed. To me, "list of users" [your original words] implies just that: a list; hence my suggestion that you look at 'logins()'. I assume that you found some value to my response although you didn't indicate so.
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2010 09:42 AM
тАО06-16-2010 09:42 AM
Re: the cmd to chk file permissions for all the users
Oh, and another thing:
> SEP: logins -m seems to show the user id and primary group of each user.
No, there is no "seems" about it. Look at the output for 'root' on any server. *All* of the groups to which 'root' belongs are listed.
@ M.P. Not liking an answer is hardly an excuse for not evaluating it. We old-timers see a high correlation between the number of points assigned to an answer and how well the OP wants to hear it.
...JRF...