tag:blogger.com,1999:blog-5826231862295491795.post7106842224858181889..comments2024-03-18T15:25:22.470-07:00Comments on Linux World: Finding the user id of a usertuxthinkhttp://www.blogger.com/profile/11642576082677583230noreply@blogger.comBlogger3125tag:blogger.com,1999:blog-5826231862295491795.post-21658916936093932462012-04-18T04:06:28.003-07:002012-04-18T04:06:28.003-07:00Thanks for the info on id...Thanks for the info on id...tuxthinkhttps://www.blogger.com/profile/11642576082677583230noreply@blogger.comtag:blogger.com,1999:blog-5826231862295491795.post-39526988383912690782012-04-18T02:50:33.360-07:002012-04-18T02:50:33.360-07:00Just in case :
% id -u apache
80Just in case :<br /><br />% id -u apache<br />80Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5826231862295491795.post-40359282765496085812012-04-18T02:48:39.712-07:002012-04-18T02:48:39.712-07:00Seriously ?
Have you ever heard of id ? (/usr/bin...Seriously ?<br /><br />Have you ever heard of id ? (/usr/bin/id)<br /><br />% id apache<br />uid=80(apache) gid=80(apache) groups=80(apache)<br /><br />And if you really want to write a script, could you please leave awk alone for such easy tasks ?<br /><br />read username<br />grep ^$username /etc/passwd | cut -d: -f 3Anonymousnoreply@blogger.com